/* --- B2 Phrases Feature Styles --- */

.b2-phrases-page {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.b2-intro-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-left: 5px solid #004d99;
}

.b2-intro-card h2 {
    color: #004d99;
    margin-top: 0;
    font-size: 1.8rem;
}

.b2-intro-card p {
    color: #334155;
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.b2-note-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #1e293b;
}

.b2-note-box-title {
    font-weight: bold;
    color: #004d99;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Progress Summary --- */
.b2-progress-summary {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.b2-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.b2-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.b2-stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: #004d99;
}

.b2-stat-label {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.b2-category-progress {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.b2-cat-progress-item {
    font-size: 0.9rem;
}

.b2-cat-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.35rem;
}

.b2-cat-progress-fill {
    height: 100%;
    background: #28a745;
    width: 0%;
    transition: width 0.3s ease;
}

/* --- Controls & Filter Bar --- */
.b2-controls-bar {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.b2-mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.b2-mode-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    border-bottom: 3px solid transparent;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.b2-mode-btn:hover {
    color: #004d99;
}

.b2-mode-btn.active {
    color: #004d99;
    border-bottom-color: #004d99;
}

.b2-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
    align-items: center;
}

.b2-search-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
}

.b2-select-filter {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #ffffff;
}

/* --- Phrase Card --- */
.b2-phrase-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.b2-phrase-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.b2-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.b2-card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.b2-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.b2-badge-num {
    background: #004d99;
    color: #ffffff;
}

.b2-badge-b1 {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.b2-badge-b1plus {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.b2-badge-b2 {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.b2-badge-cat {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.b2-phrase-french {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.b2-phrase-explanation {
    font-size: 1rem;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.b2-phrase-usage {
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    background: #f8fafc;
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    border-left: 3px solid #004d99;
    margin-bottom: 1rem;
}

.b2-example-box {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.b2-example-fr {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.b2-example-en {
    font-size: 0.95rem;
    color: #475569;
    font-style: italic;
}

.b2-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.b2-audio-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.b2-status-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.b2-practice-set-toggle {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.b2-practice-set-toggle.in-set {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

/* --- Speech Practice Selection --- */
.b2-speech-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.b2-speech-feedback {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.85rem;
}

/* --- Recall & Speak Mode Runner --- */
.b2-mode-runner {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .b2-phrases-page {
        padding: 0 0.5rem;
    }
    .b2-intro-card, .b2-progress-summary, .b2-controls-bar, .b2-mode-runner {
        padding: 1.25rem;
    }
    .b2-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .b2-audio-actions, .b2-status-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
