/**
 * Vibe Check Gallery Styles
 * Expo-slider style carousel with parallax and scale effects
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --pg-primary: #3b82f6;
    --pg-primary-hover: #2563eb;
    --pg-bg-dark: #0a0a0a;
    --pg-bg-overlay: rgba(0, 0, 0, 0.95);
    --pg-text-light: #ffffff;
    --pg-text-muted: rgba(255, 255, 255, 0.7);
    --pg-border-radius: 12px;
    --pg-transition: 0.3s ease;
    --pg-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ==========================================================================
   Gallery Button
   ========================================================================== */
.vibe-check-gallery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--pg-primary);
    color: white;
    border: none;
    border-radius: var(--pg-border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pg-transition);
    font-family: var(--pg-font-family);
}

.vibe-check-gallery-btn:hover {
    background: var(--pg-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.vibe-check-gallery-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.vibe-check-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    font-family: var(--pg-font-family);
}

.vibe-check-gallery-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.vibe-check-gallery-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--pg-bg-overlay);
    backdrop-filter: blur(10px);
}

.vibe-check-gallery-modal__container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.vibe-check-gallery-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--pg-transition);
}

/* Host themes (Elementor) inject global button background / hover rules that
   win over a plain `background: transparent`. Force transparency and a white
   icon across every interactive state. */
.vibe-check-gallery-modal__close,
.vibe-check-gallery-modal__close:hover,
.vibe-check-gallery-modal__close:focus,
.vibe-check-gallery-modal__close:focus-visible,
.vibe-check-gallery-modal__close:active {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.vibe-check-gallery-modal__close svg {
    stroke: #ffffff;
}

.vibe-check-gallery-modal__close:hover {
    transform: rotate(90deg);
}

.expo-control {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--pg-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--pg-transition);
}

.expo-control:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--pg-text-light);
}

.expo-control.active {
    background: var(--pg-primary);
    border-color: var(--pg-primary);
    color: white;
}

.vibe-check-gallery-modal__content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    position: relative;
}

/* Loading & Empty States */
.vibe-check-gallery-modal__loading,
.vibe-check-gallery-modal__empty {
    text-align: center;
    color: var(--pg-text-muted);
}

.vibe-check-gallery-modal__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--pg-primary);
    border-radius: 50%;
    animation: pg-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes pg-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Expo Slider (slider dist ships the effect CSS; this section adds the
   demo-equivalent sizing/typography that isn't bundled in dist)
   ========================================================================== */
/* dist sets --expo-image-border-radius: 16px; we only override at md+ */
@media (min-width: 768px) {
    :root {
        --expo-image-border-radius: 32px;
    }
}

.expo-slider-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.expo-slider {
    max-width: 100%;
}

/* hello-elementor (and many themes) ship `img { max-width: 100% }`, which
   clamps the expo image and breaks the effect — it needs to render at 125%
   width so its edges extend past the container and get clipped by the
   rounded overflow:hidden on .expo-container. */
.expo-slider .expo-image {
    max-width: none;
}

.expo-slider.swiper-horizontal {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: auto 0;
}

.expo-slider.swiper-vertical {
    height: 100%;
    aspect-ratio: 9 / 16;
}

.expo-content {
    padding: 16px;
    font-weight: bold;
    line-height: 1.1;
    text-wrap-style: balance;
    display: flex;
    align-items: end;
    box-sizing: border-box;
    color: #fff;
    font-size: 5.6vw;
}

@media (min-width: 640px) {
    .expo-content {
        padding: 32px;
    }
}

.swiper-vertical .expo-content {
    font-size: 4.5vh;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .vibe-check-gallery-modal__container {
        padding: 10px;
    }
    
    .vibe-check-gallery-modal__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 50px 15px 10px;
    }
    
    .vibe-check-gallery-modal__title {
        font-size: 18px;
    }
    
    .vibe-check-gallery-modal__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .expo-control {
        padding: 6px 12px;
        font-size: 12px;
    }
}
