/**
 * VSL (Video Sales Letter) Page
 * Design System: Luxury Fitness Coaching | Gold: #C5A059
 *
 * @package FitnessCoachProTheme
 */

/* ═══════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (Design Tokens)
═══════════════════════════════════════════ */
:root {
    --vsl-gold: #C5A059;
    --vsl-gold-light: #C5A059cc;
    --vsl-gold-dark: #C5A059bb;
    --vsl-bg: #FDFBF7;
    --vsl-surface: #ffffff;
    --vsl-surface-2: #f9f7f3;
    --vsl-card: #ffffff;
    --vsl-border: rgba(197, 160, 89, 0.15);
    --vsl-border-light: rgba(197, 160, 89, 0.08);
    --vsl-text: #111111;
    --vsl-text-muted: #7f7667;
    --vsl-text-light: #9e9589;
    --vsl-white: #ffffff;
    --vsl-dark-bg: #f0ede8;
    --vsl-shadow-sm: 0 2px 16px rgba(197, 160, 89, 0.08);
    --vsl-shadow-md: 0 8px 40px rgba(197, 160, 89, 0.12);
    --vsl-shadow-gold: 0 8px 32px rgba(197, 160, 89, 0.15);
    --vsl-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --vsl-font-body: 'Outfit', 'Cairo', sans-serif;
    --vsl-font-display: 'Playfair Display', 'EB Garamond', serif;
}

[data-vsl-theme="dark"] {
    --vsl-bg: #0d0d0d;
    --vsl-surface: #141414;
    --vsl-surface-2: #1c1c1c;
    --vsl-card: #202020;
    --vsl-border: rgba(197, 160, 89, 0.22);
    --vsl-border-light: rgba(197, 160, 89, 0.08);
    --vsl-text: #f0ede8;
    --vsl-text-muted: #aeaba6;
    --vsl-text-light: #6b6865;
    --vsl-white: #1a1a1a;
    --vsl-dark-bg: #060606;
    --vsl-shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.55);
    --vsl-shadow-md: 0 8px 40px rgba(0, 0, 0, 0.65);
    --vsl-shadow-gold: 0 8px 32px rgba(197, 160, 89, 0.12);
}

/* ═══════════════════════════════════════════
   2. RESET & PAGE LAYOUT
═══════════════════════════════════════════ */
.fcp-vsl-page *,
.fcp-vsl-page *::before,
.fcp-vsl-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Override main theme header spacing */
body.page-template-page-vsl,
body.page-template-page-vsl #wpadminbar ~ * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.fcp-vsl-page {
    min-height: 100vh;
    background: var(--vsl-bg);
    color: var(--vsl-text);
    font-family: var(--vsl-font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
}

/* Subtle radial gradient vignette */
.fcp-vsl-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.03) 100%
    );
    pointer-events: none;
    z-index: 0;
}

[data-vsl-theme="dark"] .fcp-vsl-page::before {
    background: radial-gradient(
        ellipse at 50% 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.25) 100%
    );
}

.fcp-vsl-page a {
    text-decoration: none;
    color: inherit;
}

.fcp-vsl-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ═══════════════════════════════════════════
   3. THEME TOGGLE BUTTON
═══════════════════════════════════════════ */
.fcp-vsl-theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--vsl-border);
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--vsl-text-muted);
    transition: var(--vsl-transition);
    padding: 0;
    flex-shrink: 0;
    overflow: hidden;
}

.fcp-vsl-theme-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.14) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fcp-vsl-theme-toggle:hover {
    border-color: var(--vsl-gold);
    color: var(--vsl-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.fcp-vsl-theme-toggle:hover::after {
    opacity: 1;
}

.fcp-vsl-theme-toggle:active {
    transform: scale(0.9);
}

.fcp-vsl-theme-toggle .material-symbols-outlined {
    font-size: 19px;
    font-variation-settings: 'FILL' 0, 'wght' 300;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fcp-vsl-theme-toggle:hover .material-symbols-outlined {
    transform: rotate(18deg) scale(1.08);
}

/* Theme button — spin on toggle */
#fcp-vsl-theme-toggle .material-symbols-outlined {
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

/* ═══════════════════════════════════════════
   4. HERO SECTION
═══════════════════════════════════════════ */
.fcp-vsl-hero {
    padding: 120px 24px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.fcp-vsl-headline {
    font-family: var(--vsl-font-display);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--vsl-gold);
    margin-bottom: 16px;
}

[data-vsl-theme="dark"] .fcp-vsl-headline {
    text-shadow: 0 0 40px rgba(197, 160, 89, 0.15);
}

.fcp-vsl-subtext {
    font-family: var(--vsl-font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--vsl-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════
   5. VIDEO CONTAINER
═══════════════════════════════════════════ */
.fcp-vsl-video-wrapper {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 16px;
    border: 1px solid var(--vsl-border);
    box-shadow: var(--vsl-shadow-gold);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

/* Padding-bottom fallback for older browsers */
@supports not (aspect-ratio: 16 / 9) {
    .fcp-vsl-video-wrapper {
        aspect-ratio: unset;
        padding-bottom: 56.25%;
        height: 0;
    }
}

[data-vsl-theme="dark"] .fcp-vsl-video-wrapper {
    box-shadow: 0 8px 48px rgba(197, 160, 89, 0.18),
                0 0 0 1px rgba(197, 160, 89, 0.12);
}

.fcp-vsl-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.fcp-vsl-video-container > div,
.fcp-vsl-video-container iframe,
.fcp-vsl-video-container video {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.fcp-vsl-video-wrapper video,
.fcp-vsl-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

/* ═══════════════════════════════════════════
   6. CUSTOM VIDEO PLAYER CONTROLS
═══════════════════════════════════════════ */
.fcp-vsl-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px 8px;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 10;
}

.fcp-vsl-video-wrapper:hover .fcp-vsl-controls {
    opacity: 1;
}

/* ─── Progress Bar ─── */
.fcp-vsl-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    margin-bottom: 8px;
    transition: height 0.2s ease;
}

.fcp-vsl-progress:hover {
    height: 6px;
}

.fcp-vsl-progress__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--vsl-gold), #e5c382);
    box-shadow: 0 0 8px var(--vsl-gold-light);
    transition: width 0.1s linear;
    min-width: 0;
}

/* ─── Controls Row ─── */
.fcp-vsl-controls__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fcp-vsl-controls__left,
.fcp-vsl-controls__right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Control Buttons ─── */
.fcp-vsl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.fcp-vsl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fcp-vsl-btn .material-symbols-outlined {
    font-size: 22px;
    font-variation-settings: 'FILL' 1, 'wght' 400;
}

/* ─── Volume Slider ─── */
.fcp-vsl-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    margin: 0 4px;
}

.fcp-vsl-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vsl-gold);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(197, 160, 89, 0.4);
}

.fcp-vsl-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vsl-gold);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(197, 160, 89, 0.4);
}

.fcp-vsl-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 4px;
}

.fcp-vsl-volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

/* ─── Time Display ─── */
.fcp-vsl-time {
    font-size: 12px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.04em;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
    user-select: none;
}

/* ═══════════════════════════════════════════
   7. PLAY OVERLAY
═══════════════════════════════════════════ */
.fcp-vsl-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
}

.fcp-vsl-play-overlay:hover {
    background: rgba(0, 0, 0, 0.3);
}

.fcp-vsl-play-overlay__btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--vsl-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    animation: fcp-vsl-play-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fcp-vsl-play-overlay__btn .material-symbols-outlined {
    font-size: 40px;
    color: var(--vsl-gold);
    font-variation-settings: 'FILL' 1, 'wght' 400;
    margin-left: 4px; /* Optical centering for play triangle */
}

.fcp-vsl-play-overlay:hover .fcp-vsl-play-overlay__btn {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
    border-color: #e5c382;
}

@keyframes fcp-vsl-play-appear {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hide overlay when video is playing */
.fcp-vsl-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* ═══════════════════════════════════════════
   8. CTA BUTTON SECTION
═══════════════════════════════════════════ */
.fcp-vsl-cta-section {
    text-align: center;
    padding: 40px 24px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;

    /* Initially hidden — revealed by JS */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fcp-vsl-cta-section.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ─── CTA Button ─── */
.fcp-vsl-cta-btn {
    display: inline-block;
    padding: 18px 48px;
    font-family: var(--vsl-font-body);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #c5a059, #a0804a);
    color: #0d0d0d;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(197, 160, 89, 0.3);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fcp-vsl-pulse 2s infinite;
}

.fcp-vsl-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.fcp-vsl-cta-btn:hover::before {
    transform: translateX(100%);
}

.fcp-vsl-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(197, 160, 89, 0.4);
    color: #0d0d0d;
}

.fcp-vsl-cta-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.3);
}

@keyframes fcp-vsl-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(197, 160, 89, 0);
    }
}

/* ═══════════════════════════════════════════
   9. TRUST BADGE
═══════════════════════════════════════════ */
.fcp-vsl-trust {
    margin-top: 16px;
    font-family: var(--vsl-font-body);
    font-size: 13px;
    color: var(--vsl-text-muted);
    text-align: center;
    line-height: 1.6;
}

.fcp-vsl-trust .material-symbols-outlined {
    font-size: 15px;
    vertical-align: -2px;
    margin-inline-end: 4px;
    color: var(--vsl-gold);
}

/* ═══════════════════════════════════════════
   10. DARK MODE SPECIFIC OVERRIDES
═══════════════════════════════════════════ */

/* Theme toggle — lighter border in dark mode */
[data-vsl-theme="dark"] .fcp-vsl-theme-toggle {
    border-color: rgba(197, 160, 89, 0.25);
}

[data-vsl-theme="dark"] .fcp-vsl-theme-toggle:hover {
    border-color: var(--vsl-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

/* Video wrapper — stronger gold glow */
[data-vsl-theme="dark"] .fcp-vsl-video-wrapper {
    box-shadow: 0 8px 48px rgba(197, 160, 89, 0.18),
                0 0 0 1px rgba(197, 160, 89, 0.12);
}

/* Headline text-shadow more visible */
[data-vsl-theme="dark"] .fcp-vsl-headline {
    text-shadow: 0 0 60px rgba(197, 160, 89, 0.22);
}

/* Page background fallback */
[data-vsl-theme="dark"] .fcp-vsl-page {
    background-color: #0d0d0d;
    color: #f0ede8;
}

/* CTA button text ensure readability in dark */
[data-vsl-theme="dark"] .fcp-vsl-cta-btn {
    box-shadow: 0 8px 30px rgba(197, 160, 89, 0.2),
                0 0 0 1px rgba(197, 160, 89, 0.1);
}

[data-vsl-theme="dark"] .fcp-vsl-cta-btn:hover {
    box-shadow: 0 12px 40px rgba(197, 160, 89, 0.3),
                0 0 0 1px rgba(197, 160, 89, 0.15);
}

/* ═══════════════════════════════════════════
   11. RESPONSIVE — TABLET (max-width: 768px)
═══════════════════════════════════════════ */
@media (max-width: 768px) {

    .fcp-vsl-hero {
        padding: 80px 16px 24px;
    }

    .fcp-vsl-headline {
        font-size: clamp(24px, 6vw, 36px);
    }

    .fcp-vsl-subtext {
        font-size: 16px;
    }

    .fcp-vsl-video-wrapper {
        margin: 24px 12px;
        border-radius: 12px;
    }

    .fcp-vsl-controls {
        padding: 10px 12px 6px;
    }

    .fcp-vsl-volume-slider {
        width: 60px;
    }

    .fcp-vsl-time {
        font-size: 11px;
        min-width: 76px;
    }

    .fcp-vsl-cta-section {
        padding: 32px 16px;
    }

    .fcp-vsl-cta-btn {
        padding: 16px 36px;
        font-size: 16px;
        border-radius: 10px;
    }

    .fcp-vsl-play-overlay__btn {
        width: 68px;
        height: 68px;
    }

    .fcp-vsl-play-overlay__btn .material-symbols-outlined {
        font-size: 34px;
    }

    .fcp-vsl-theme-toggle {
        top: 16px;
        right: 16px;
    }
}

/* ═══════════════════════════════════════════
   12. RESPONSIVE — MOBILE (max-width: 480px)
═══════════════════════════════════════════ */
@media (max-width: 480px) {

    .fcp-vsl-hero {
        padding: 64px 12px 20px;
    }

    .fcp-vsl-headline {
        font-size: clamp(22px, 7vw, 30px);
    }

    .fcp-vsl-subtext {
        font-size: 15px;
    }

    .fcp-vsl-video-wrapper {
        margin: 16px 8px;
        border-radius: 10px;
    }

    .fcp-vsl-controls__row {
        gap: 4px;
    }

    .fcp-vsl-volume-slider {
        width: 48px;
    }

    .fcp-vsl-time {
        font-size: 10px;
        min-width: 64px;
    }

    .fcp-vsl-cta-section {
        padding: 24px 12px;
    }

    .fcp-vsl-cta-btn {
        padding: 14px 28px;
        font-size: 15px;
        width: 100%;
        max-width: 320px;
    }

    .fcp-vsl-play-overlay__btn {
        width: 60px;
        height: 60px;
        border-width: 1.5px;
    }

    .fcp-vsl-play-overlay__btn .material-symbols-outlined {
        font-size: 30px;
        margin-left: 3px;
    }

    .fcp-vsl-theme-toggle {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }

    .fcp-vsl-theme-toggle .material-symbols-outlined {
        font-size: 17px;
    }

    .fcp-vsl-trust {
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════
   13. RTL SUPPORT
═══════════════════════════════════════════ */
body.rtl-layout .fcp-vsl-theme-toggle {
    right: auto;
    left: 24px;
}

body.rtl-layout .fcp-vsl-hero {
    direction: rtl;
}

body.rtl-layout .fcp-vsl-cta-section {
    direction: rtl;
}

body.rtl-layout .fcp-vsl-trust {
    direction: rtl;
}

/* RTL progress bar fill — anchor from right */
body.rtl-layout .fcp-vsl-progress__fill {
    left: auto;
    right: 0;
}

/* RTL play icon optical centering */
body.rtl-layout .fcp-vsl-play-overlay__btn .material-symbols-outlined {
    margin-left: 0;
    margin-right: 4px;
}

/* RTL responsive toggle position */
@media (max-width: 768px) {
    body.rtl-layout .fcp-vsl-theme-toggle {
        left: 16px;
    }
}

@media (max-width: 480px) {
    body.rtl-layout .fcp-vsl-theme-toggle {
        left: 12px;
    }

    body.rtl-layout .fcp-vsl-play-overlay__btn .material-symbols-outlined {
        margin-right: 3px;
    }
}

/* ═══════════════════════════════════════════
   14. BILINGUAL UTILITY CLASSES
═══════════════════════════════════════════ */
.fcp-vsl-lang-en,
.fcp-vsl-lang-ar {
    display: inline;
}

/* When RTL layout (Arabic), hide English content and show Arabic */
body.rtl-layout .fcp-vsl-lang-en {
    display: none !important;
}

/* When LTR layout (English), hide Arabic content and show English */
body:not(.rtl-layout) .fcp-vsl-lang-ar {
    display: none !important;
}

/* Arabic text inherits Cairo from the body font stack */
body.rtl-layout .fcp-vsl-headline {
    font-family: 'EB Garamond', 'Cairo', serif;
}

body.rtl-layout .fcp-vsl-subtext,
body.rtl-layout .fcp-vsl-cta-btn,
body.rtl-layout .fcp-vsl-trust {
    font-family: 'Cairo', 'Outfit', sans-serif;
}

/* ═══════════════════════════════════════════
   15. ACCESSIBILITY & REDUCED MOTION
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

    .fcp-vsl-page,
    .fcp-vsl-page *,
    .fcp-vsl-page *::before,
    .fcp-vsl-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fcp-vsl-cta-btn {
        animation: none;
    }
}

/* Focus visible styles for keyboard navigation */
.fcp-vsl-theme-toggle:focus-visible,
.fcp-vsl-btn:focus-visible,
.fcp-vsl-cta-btn:focus-visible {
    outline: 2px solid var(--vsl-gold);
    outline-offset: 2px;
}
