/* vocab_hub.css - Shared Premium Vocabulary UI Components (e.g., Modals) */

/* METRICS & BENTO GRID */
.metric-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.metric-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--vocab-text-muted, #64748b);
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vocab-text, #1e293b);
}

.metric-value.highlight {
    color: var(--vocab-primary, #4f46e5);
}

.metric-value.success {
    color: #10b981;
}

/* PROGRESS BAR */
.mastery-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.mastery-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--vocab-primary, #4f46e5);
    text-align: center;
    margin: 0.5rem 0;
}

/* DISTRIBUTION */
.dist-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.dist-label {
    width: 80px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--vocab-text-muted, #64748b);
    text-transform: capitalize;
}

.dist-bar-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.dist-bar {
    height: 100%;
    border-radius: 4px;
}

.dist-val {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 30px;
    text-align: right;
}

/* HISTORY TABLE & PILLS */
.history-section {
    background: var(--vocab-surface, #ffffff);
    border-radius: 1rem;
    border: 1px solid var(--vocab-border, #e2e8f0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.history-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--vocab-border, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    color: var(--vocab-text-muted, #64748b);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--vocab-border, #e2e8f0);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--vocab-border, #e2e8f0);
    color: var(--vocab-text, #1e293b);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

.result-pill {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.result-pill.correct {
    background: #dcfce7;
    color: #16a34a;
}

.result-pill.incorrect {
    background: #fee2e2;
    color: #dc2626;
}

.mode-icon {
    color: var(--vocab-text-muted, #64748b);
    margin-right: 0.5rem;
}

/* Premium Bento Grid & Integrated Components */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 0.75rem;
    padding: 0.25rem;
}

.bento-item {
    background: white;
    border-radius: 1.25rem;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-item:active {
    transform: scale(0.98);
}

.bento-item.large {
    grid-column: span 2;
    padding: 1.25rem;
}

.bento-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.bento-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1e293b;
}

.bento-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Premium Note specific refinements */
.premium-note-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-note-card:hover {
    box-shadow: 0 10px 15px -3px rgba(250, 204, 21, 0.2);
}

#item-note-input:focus {
    border-color: #eab308;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.1);
}

/* Sub-Tab Navigation Pills */
.sub-tab-btn {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--vocab-text-muted, #64748b);
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.5rem;
    border-radius: 99px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.sub-tab-btn.active {
    background: white;
    color: var(--vocab-primary, #4f46e5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}