/**
 * HMVIP Gallery Lightbox Styles
 *
 * Modal de visualização em tela cheia para imagens e vídeos do grid.
 *
 * @since 4.6.0
 * @package HMVIP\Player\UI
 */

/* ============================================
   MODAL OVERLAY
   ============================================ */
.hmvip-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hmvip-gallery-modal.is-open {
    opacity: 1;
    visibility: visible;
}

body.hmvip-modal-open {
    overflow: hidden;
}

/* Backdrop */
.hmvip-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Content wrapper */
.hmvip-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    box-sizing: border-box;
}

/* ============================================
   STAGE (imagem/vídeo exibido)
   ============================================ */
.hmvip-modal-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
}

.hmvip-modal-stage img,
.hmvip-modal-stage video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ============================================
   CLOSE BUTTON
   ============================================ */
.hmvip-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.hmvip-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.hmvip-modal-close:active {
    transform: scale(0.95);
}

/* ============================================
   NAV BUTTONS (prev/next)
   ============================================ */
.hmvip-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.hmvip-modal-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.hmvip-modal-prev {
    left: 12px;
}

.hmvip-modal-next {
    right: 12px;
}

/* ============================================
   DOTS INDICATOR
   ============================================ */
.hmvip-modal-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hmvip-modal-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.hmvip-modal-dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

.hmvip-modal-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ============================================
   COUNTER
   ============================================ */
.hmvip-modal-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
    .hmvip-modal-content {
        padding: 40px 0;
    }

    .hmvip-modal-close {
        top: 8px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .hmvip-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .hmvip-modal-prev {
        left: 4px;
    }

    .hmvip-modal-next {
        right: 4px;
    }

    .hmvip-modal-stage img,
    .hmvip-modal-stage video {
        border-radius: 0;
        box-shadow: none;
    }

    .hmvip-modal-counter {
        bottom: 12px;
        right: 12px;
        font-size: 12px;
    }

    .hmvip-modal-dots {
        bottom: 12px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .hmvip-gallery-modal,
    .hmvip-modal-stage,
    .hmvip-modal-close,
    .hmvip-modal-nav,
    .hmvip-modal-dot {
        transition: none !important;
    }
}
