/* ============================================
   TECHNICAL NAMES APP - APP SPECIFIC CSS
   Styles unique to this app
   Common styles in shared.css and flashcard-common.css
   ============================================ */

/* Settings Panel */
.settings-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 12px;
    padding: 16px 20px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.setting-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.setting-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.setting-btn:hover {
    color: var(--text);
    background: var(--card);
}

.setting-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
}

/* Flashcard sizing */
.flashcard-container {
    min-height: 220px;
    height: 220px;
}

.flashcard {
    height: 220px;
}

/* Ensure flashcard front and back have fixed dimensions */
.flashcard-front,
.flashcard-back {
    height: 220px;
}

/* Flip button - positioned at bottom (CRITICAL: must be absolute) */
.hint-controls {
    position: absolute;
    bottom: 2px;
    left: 12px;
    right: 12px;
    text-align: center;
    background: linear-gradient(to top, var(--card) 60%, transparent);
    padding: 16px 16px 8px;
    z-index: 2;
    margin: 0;
    border-radius: 0 0 10px 10px;
}

body.dark-mode .hint-controls {
    background: linear-gradient(to top, var(--card) 60%, transparent);
}

/* Key display badge - absolute positioned */
.key-display {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
    z-index: 1;
}

/* VexFlow Notation Container */
.notation-container {
    width: 100%;
    max-width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.notation-container svg {
    max-width: 100%;
    height: auto;
}

body.dark-mode .notation-container svg {
    filter: invert(1) hue-rotate(180deg);
}

/* Question text for Name -> Note mode */
.question-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    padding: 20px;
    line-height: 1.4;
    margin-top: 20px;
}

/* Answer reveal on card back */
.answer-reveal {
    font-size: 48px;
    font-weight: 900;
    color: #6366f1;
    margin-bottom: 8px;
    text-align: center;
}

.answer-label {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Answer layout */
.answer-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.answer-row {
    display: flex;
    justify-content: center;
}

.pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Technical name pills */
.pill {
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    min-width: 54px;
    text-align: center;
}

.pill:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.pill:active:not(:disabled) {
    transform: scale(0.96);
}

.pill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pill.correct {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #15803d;
    color: white;
}

.pill.incorrect {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #b91c1c;
    color: white;
}

/* Technical name pills - wider for longer names */
.technical-name-pill {
    font-size: 0.85rem;
    padding: 10px 14px;
    min-width: 100px;
}

.answer-row.name-row {
    justify-content: center;
}

.answer-row.name-row .pills {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Key quality badge (shown in questions) */
.key-quality-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.key-quality-badge.major {
    background: var(--primary);
    color: white;
}

.key-quality-badge.minor {
    background: var(--secondary);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .settings-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .setting-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .setting-toggle {
        width: 100%;
        justify-content: center;
    }

    .flashcard-container {
        min-height: 200px;
    }

    .flashcard {
        height: 200px;
    }

    .notation-container {
        max-width: 300px;
    }

    .question-text {
        font-size: 1.2rem;
        padding: 16px;
    }

    .answer-reveal {
        font-size: 40px;
    }

    .pill {
        padding: 12px 12px;
        font-size: 13px;
        min-width: 46px;
    }

    .technical-name-pill {
        font-size: 0.75rem;
        padding: 8px 10px;
        min-width: 80px;
    }

    .key-display {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .flashcard-container {
        min-height: 170px;
    }

    .flashcard {
        height: 170px;
    }

    .notation-container {
        max-width: 260px;
    }

    .question-text {
        font-size: 1.1rem;
        padding: 12px;
    }

    .answer-reveal {
        font-size: 32px;
    }

    .pill {
        padding: 10px 10px;
        font-size: 12px;
        min-width: 42px;
        border-radius: 10px;
    }

    .technical-name-pill {
        font-size: 0.7rem;
        padding: 6px 8px;
        min-width: 70px;
    }
}
