/**
 * Ürün Medya Modülü: Görsel Büyütme (Lightbox) + Video Dialog
 */

/* Ana görsel: tıklanabilir */
.fedo-zoomable {
    cursor: zoom-in;
}

/* "Tam ekran görüntüle" butonu (ana görselin sağ altında) */
.fedo-zoom-trigger {
    position: absolute;
    right: 16px;
    bottom: 20px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: #fff;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fedo-zoom-trigger:hover {
    background: #000;
    color: #fff;
    transform: scale(1.06);
}

.fedo-zoom-trigger:focus-visible {
    outline: 2px solid #000;
    outline-offset: 3px;
}

.fedo-zoom-trigger svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    .fedo-zoom-trigger {
        right: 10px;
        bottom: 12px;
        width: 38px;
        height: 38px;
    }

    .fedo-zoom-trigger svg {
        width: 16px;
        height: 16px;
    }
}

/* "Videoyu Oynat" butonu (ana görselin üstünde) */
.fedo-video-trigger {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 10px;
    background: #000;
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.fedo-video-trigger:hover {
    background: #262626;
    transform: translateX(-50%) scale(1.03);
}

.fedo-video-trigger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.fedo-video-trigger__icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fedo-video-trigger__icon svg {
    width: 12px;
    height: 12px;
    margin-left: 2px;
}

@media (max-width: 640px) {
    .fedo-video-trigger {
        bottom: 12px;
        font-size: 11px;
        padding: 8px 16px 8px 8px;
    }

    .fedo-video-trigger__icon {
        width: 26px;
        height: 26px;
    }
}

/* Ortak overlay */
.fedo-media-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fedo-media-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

body.fedo-media-lock {
    overflow: hidden;
}

.fedo-media-close,
.fedo-lightbox-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fedo-media-close:hover,
.fedo-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.fedo-media-close svg,
.fedo-lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.fedo-media-close {
    top: 12px;
    right: 12px;
    z-index: 2;
}

/* Lightbox */
.fedo-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 112px);
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    transform: scale(0.97);
    transition: transform 0.25s ease, opacity 0.15s ease;
}

.fedo-media-overlay.is-open .fedo-lightbox-img {
    transform: scale(1);
}

.fedo-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.fedo-lightbox-nav--prev {
    left: 12px;
}

.fedo-lightbox-nav--next {
    right: 12px;
}

.fedo-lightbox-counter {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    letter-spacing: 0.1em;
}

/* Video dialog */
.fedo-video-dialog {
    position: relative;
    width: 100%;
    max-width: 1100px;
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.fedo-media-overlay.is-open .fedo-video-dialog {
    transform: scale(1);
}

.fedo-video-dialog video {
    display: block;
    width: 100%;
    max-height: calc(100vh - 112px);
    background: #000;
}

.fedo-video-dialog__embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 112px);
    background: #000;
}

.fedo-video-dialog__embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
