/* FAQ Modal Styles
   Purpose: Adapt existing .faq-item and .text-page styles for modal context
   Design: Mobile-first, scrollable content, green accent theme (#00ff88)
   Scope: FAQ modal only (#faq-modal)
*/

/* Modal shell overrides for green theme (matching center modals) */
#faq-modal .modal-content {
    background-color: #101018 !important;
    border: 1px solid #00ff88 !important;
    border-radius: 18px !important; /* Curved corners matching center modals */
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    max-height: calc(100vh - 14vh); /* Mobile-first: taller modals */
    display: flex;
    flex-direction: column;
}

/* Modal body: scrollable region */
#faq-modal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
    /* Custom scrollbar matching green theme */
    scrollbar-width: thin;
    scrollbar-color: #00ff88 rgba(0, 255, 136, 0.1);
}

#faq-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#faq-modal .modal-body::-webkit-scrollbar-track {
    background: rgba(0, 255, 136, 0.05);
    border-radius: 4px;
}

#faq-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.4);
    border-radius: 4px;
    transition: background 0.2s ease;
}

#faq-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.6);
}

/* Effective date text */
#faq-modal .effective-date {
    text-align: center;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 2em;
    font-size: 0.95rem;
}

/* Section headers */
#faq-modal section h2 {
    color: var(--secondary-color);
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid var(--secondary-color);
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

#faq-modal section:first-of-type h2 {
    margin-top: 0; /* First section no top margin */
}

/* FAQ item cards */
#faq-modal .faq-item {
    margin-bottom: 2em;
    padding: 1.2em 1.2em 1.2em 1.8em;
    border-left: 3px solid #00ff88;
    background-color: rgba(0, 255, 136, 0.05);
    border-radius: 0 6px 6px 0;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#faq-modal .faq-item:hover {
    background-color: rgba(0, 255, 136, 0.08);
    border-left-color: rgba(0, 255, 136, 0.9);
}

/* Question styling */
#faq-modal .faq-item h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.8em;
    text-shadow: 0 0 4px var(--primary-color);
    line-height: 1.4;
}

/* Answer text */
#faq-modal .faq-item p {
    color: #dfffe8;
    line-height: 1.7;
    margin-bottom: 0.8em;
    font-size: 1rem;
}

#faq-modal .faq-item p:last-child {
    margin-bottom: 0;
}

/* Strong emphasis in answers */
#faq-modal .faq-item p strong {
    color: var(--primary-color);
    font-weight: bold;
}

/* Links within FAQ items */
#faq-modal .faq-item a {
    color: #00ff88;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(0, 255, 136, 0.5);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

#faq-modal .faq-item a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Discord button link */
#faq-modal .discord-link-button {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid #00ff88;
    color: #00ff88;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(0, 255, 136, 0.05);
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.3);
    letter-spacing: 0.5px;
}

#faq-modal .discord-link-button:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.9);
    color: #00ff88;
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
}

/* Tablet breakpoint */
@media (min-width: 560px) and (max-width: 960px) {
    #faq-modal .modal-content {
        max-height: calc(100vh - 16vh); /* Slightly shorter on tablets */
    }

    #faq-modal .modal-body {
        padding: 22px 28px;
    }

    #faq-modal .faq-item {
        padding: 1.4em 1.4em 1.4em 2em;
    }
}

/* Desktop breakpoint */
@media (min-width: 961px) {
    #faq-modal .modal-content {
        max-height: calc(100vh - 24vh); /* Shorter on desktop (more chrome) */
    }

    #faq-modal .modal-body {
        padding: 24px 32px;
    }

    #faq-modal .faq-item {
        padding: 1.5em 1.5em 1.5em 2.2em;
    }

    #faq-modal section h2 {
        font-size: 1.5rem;
    }

    #faq-modal .faq-item h3 {
        font-size: 1.3rem;
    }
}

/* Mobile landscape optimization */
@media (max-height: 500px) {
    #faq-modal .modal-content {
        max-height: calc(100vh - 8vh); /* Maximize vertical space */
    }

    #faq-modal .modal-body {
        padding: 16px 20px;
    }

    #faq-modal .faq-item {
        margin-bottom: 1.5em;
        padding: 1em 1em 1em 1.5em;
    }

    #faq-modal section h2 {
        margin-top: 1.5em;
        font-size: 1.2rem;
    }
}
