/*
 Theme Name:   Gray Swan Theme
 Author:       Gemini & Your Name
 Description:  A high-fidelity, custom WordPress theme for Gray Swan Trading, built with Tailwind CSS and advanced animations.
 Version:      2.0.0
 Text Domain:  grayswan
*/

/* Book detail cards styling to match indicator detail cards */
.book-detail-card {
    @apply space-y-6;
}

.book-details-accordion {
    transition: all 0.5s ease-in-out;
    /* Ensure smooth scrolling and prevent content from being cut off */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* For smooth scrolling on iOS */
}

/* Custom scrollbar styling for better UX */
.book-details-accordion::-webkit-scrollbar {
    width: 8px;
}

.book-details-accordion::-webkit-scrollbar-track {
    background: rgba(51, 65, 85, 0.3);
    border-radius: 4px;
}

.book-details-accordion::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.5);
    border-radius: 4px;
}

.book-details-accordion::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.7);
}

/* Black Friday menu chip */
.black_friday-menu-item>a {
    background: linear-gradient(120deg, #FF7700 0%, #CC6000 100%);
    color: #ffffff !important;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    box-shadow: 0 10px 30px rgba(255, 119, 0, 0.35);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.black_friday-menu-item>a:hover {
    background: linear-gradient(120deg, #E56900 0%, #B85200 100%);
    color: #ffffff !important;
    box-shadow: 0 15px 40px rgba(255, 119, 0, 0.45);
    transform: translateY(-1px);
}

/* Cyber Monday menu text with exact working glitch from page */
.cyber_monday-menu-item>a {
    position: relative;
    display: inline-block;
    color: #38bdf8 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
    animation: text-glitch-trigger 3.5s infinite;
    transition: all 0.3s ease;
}

.cyber_monday-menu-item>a::before,
.cyber_monday-menu-item>a::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.2;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber_monday-menu-item>a::before {
    color: #ff3366;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.8);
    animation: text-glitch-red 2.8s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    mix-blend-mode: screen;
}

.cyber_monday-menu-item>a::after {
    color: #33ddff;
    text-shadow: 0 0 8px rgba(51, 221, 255, 0.8);
    animation: text-glitch-green 3.1s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    mix-blend-mode: screen;
}

.cyber_monday-menu-item>a:hover {
    color: #7dd3fc !important;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
    transform: translateY(-2px);
}

/* Simpler, more realistic glitch animations */
@keyframes text-glitch-trigger {

    0%,
    100% {
        transform: translate(0);
        filter: none;
        opacity: 1;
    }

    92% {
        transform: translate(-1px, 1px);
        filter: brightness(1.1) saturate(1.2);
        opacity: 0.3;
    }

    94% {
        transform: translate(1px, -1px);
        filter: brightness(0.9);
        opacity: 0.2;
    }

    96% {
        transform: translate(0);
        filter: none;
        opacity: 1;
    }
}

@keyframes text-glitch-red {

    0%,
    90%,
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }

    91% {
        opacity: 0.8;
        transform: translate(-3px, 1px);
    }

    93% {
        opacity: 0.4;
        transform: translate(2px, -1px);
    }

    95% {
        opacity: 0.7;
        transform: translate(-1px, 0.5px);
    }

    97%,
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

@keyframes text-glitch-green {

    0%,
    91%,
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }

    92% {
        opacity: 0.6;
        transform: translate(2px, -1px);
    }

    94% {
        opacity: 0.9;
        transform: translate(-2px, 1px);
    }

    96% {
        opacity: 0.5;
        transform: translate(1px, -0.5px);
    }

    98%,
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

/* Higher specificity rules to override page-specific styles */
body.page-template-page-cyber-monday nav .cyber_monday-menu-item>a,
body.page-template-page-cyber-monday .menu .cyber_monday-menu-item>a {
    color: #38bdf8 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

body.page-template-page-cyber-monday nav .cyber_monday-menu-item>a:hover,
body.page-template-page-cyber-monday .menu .cyber_monday-menu-item>a:hover {
    color: #7dd3fc !important;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
    transform: translateY(-2px);
}

/* Black Friday page-specific styling for consistency */
body.page-template-page-black-friday nav .black_friday-menu-item>a,
body.page-template-page-black-friday .menu .black_friday-menu-item>a {
    background: linear-gradient(120deg, #FF7700 0%, #CC6000 100%) !important;
    color: #ffffff !important;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    box-shadow: 0 10px 30px rgba(255, 119, 0, 0.35);
    font-weight: 600;
}

body.page-template-page-black-friday nav .black_friday-menu-item>a:hover,
body.page-template-page-black-friday .menu .black_friday-menu-item>a:hover {
    background: linear-gradient(120deg, #E56900 0%, #B85200 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 15px 40px rgba(255, 119, 0, 0.45);
    transform: translateY(-1px);
}

/* Override edu-card to be lighter */
.edu-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8)) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
}