/* =========================================================
   FSA Glossary — Educational Tooltip Styles
   Clickable term definitions for financially illiterate learners
   ========================================================= */

.fsa-term {
    position: relative;
    cursor: help;
    border-bottom: 1.5px dotted rgba(16, 185, 129, 0.5);
    transition: border-color 0.2s;
}

.fsa-term:hover {
    border-bottom-color: #10b981;
}

.fsa-term::after {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    margin-left: 2px;
    vertical-align: super;
    line-height: 1;
}

/* ---- Popup overlay ---- */
.fsa-glossary-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
    animation: fsaGlossaryFadeIn 0.2s ease;
}

@keyframes fsaGlossaryFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Popup card ---- */
.fsa-glossary-popup {
    background: linear-gradient(135deg, #0f2922, #1a3a2e);
    border: 2px solid #10b981;
    border-radius: 1rem;
    max-width: 440px;
    width: 100%;
    padding: 1.75rem;
    position: relative;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    animation: fsaGlossarySlideUp 0.25s ease;
}

@keyframes fsaGlossarySlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fsa-glossary-popup-close {
    position: absolute;
    top: 0.75rem; right: 0.75rem;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.4rem;
    cursor: pointer;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.15s;
}
.fsa-glossary-popup-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Term name */
.fsa-glossary-popup h4 {
    color: #10b981;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    padding-right: 2rem;
}

/* Definition */
.fsa-glossary-popup .fsa-g-def {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Example box */
.fsa-glossary-popup .fsa-g-example {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #10b981;
    border-radius: 0.375rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0;
}

.fsa-glossary-popup .fsa-g-example-label {
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.fsa-glossary-popup .fsa-g-example p {
    color: #9ca3af;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .fsa-glossary-popup {
        max-width: 100%;
        padding: 1.25rem;
        border-radius: 0.75rem;
    }
}
