/**
 * Word Study Panel — panel-level styles shared by LexiconStudyModal (right panel).
 * Modal chrome (backdrop, header, close button) has been removed — panel is embedded
 * directly in LexiconStudyModal's right container.
 */

/* Word display — the word is the hero (FEAT-031 wash: white card,
   gold Strong's eyebrow, serif word large, italic transliteration). */
.word-study-word-display {
    padding: 0.9rem 1.2rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.wsp-word-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.word-study-word-strongs {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-text);
    font-weight: 600;
}

.wsp-word-hero {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}

.word-study-word-text {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    font-family: 'Crimson Text', Georgia, serif;
    cursor: pointer;
    user-select: all;
    border-radius: 4px;
    transition: background 0.2s;
}

.word-study-word-text:hover {
    background: var(--highlight);
}

.word-study-word-translit {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-family: 'Crimson Text', Georgia, serif;
    font-style: italic;
}

.word-study-word-meaning {
    font-size: 0.95rem;
    font-family: 'Crimson Text', Georgia, serif;
    color: var(--text-primary);
    line-height: 1.5;
    margin-top: 0.35rem;
}

.word-study-word-tags {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Word tag button uses .verse-action-btn from styles.css */

/* Letter tiles section */
.word-study-letter-tiles-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-height: 150px;
}

.word-study-letter-tiles-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.word-study-letter-tiles-container {
    min-height: 80px;
    /* LetterTiles component will inject tiles here */
}

/* Reference data section with tabs */
.word-study-reference-section {
    margin-bottom: 1.5rem;
}

/* Section headers are gold small-caps eyebrows (wash rule 3 —
   emoji markers retired with them) */
.word-study-reference-header {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--gold-text);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.word-study-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
}

.word-study-tab {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.word-study-tab:hover {
    color: var(--text-primary);
    background: var(--background);
}

.word-study-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.word-study-tab-content {
    min-height: 200px;
}

.word-study-tab-panel {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 400px;
}

.word-study-tab-panel.active {
    display: block;
}

/* Notes section — the gold left-rail card, like study notes app-wide */
.word-study-notes-section {
    margin-bottom: 1rem;
    background: var(--surface);
    border: 1px solid var(--gold-border);
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    padding: 0.8rem 1rem 0.9rem;
}

.word-study-notes-header {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--gold-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.word-study-notes-save-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.word-study-notes-save-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
.word-study-notes-save-btn.dirty {
    background: rgba(231, 76, 60, 0.15);
    border-color: var(--danger);
    color: var(--danger);
    font-weight: 600;
}

.word-study-notes-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    background: var(--surface);
    color: var(--text-primary);
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.word-study-notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.word-study-notes-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}


/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .word-study-word-display {
        padding: 0.4rem 0.75rem;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .word-study-word-text {
        font-size: 1.3rem;
    }

    .word-study-word-translit {
        font-size: 0.85rem;
    }

    .word-study-letter-tiles-section {
        padding: 0.75rem;
        min-height: 100px;
        margin-bottom: 0.75rem;
    }

    .word-study-letter-tiles-header {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .word-study-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .word-study-tab-panel {
        max-height: 300px;
    }

    .word-study-notes-textarea {
        min-height: 80px;
    }
}

/* Cognates + word-family items (WordStudyPanel) — token-themed */
.cognate-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}
.cognate-item:hover { background: var(--highlight); }
.cognate-num { font-weight: 600; color: var(--primary-light); margin-bottom: 0.25rem; }
.cognate-translit { font-size: 0.9rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.cognate-def { font-size: 0.85rem; color: var(--text-secondary); }

.family-group-label { font-weight: 600; margin-bottom: 0.75rem; }
.family-group-label.derived { color: var(--primary-light); }
.family-group-label.derivative { color: var(--success); }
.family-item { padding: 0.5rem; margin-bottom: 0.5rem; cursor: pointer; color: var(--text-primary); }
.family-item.derived { background: rgba(var(--primary-rgb), 0.10); border-left: 3px solid var(--primary-light); }
.family-item.derivative { background: rgba(var(--success-rgb), 0.12); border-left: 3px solid var(--success); }
