/* ============================================
   Torah Tracker — history
   Phase 11.5C: Split from app.css
   ============================================ */

/* ============================================
   Week View Styles
   ============================================ */

.week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 20px;
}

.week-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-title {
    font-size: 18px;
    font-weight: 600;
}

.week-chart-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px 16px 20px;
    border: 1px solid var(--border-subtle);
}

.week-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 140px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 6px;
}

.bar-column.bar-today .bar-label {
    color: var(--accent-blue);
    font-weight: 700;
}

.bar-value {
    font-size: 10px;
    color: var(--text-tertiary);
    height: 14px;
    font-weight: 500;
}

.bar-track {
    width: 28px;
    height: 100px;
    background: var(--bg-elevated);
    border-radius: 6px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.bar-fill {
    width: 100%;
    background: var(--accent-blue);
    border-radius: 6px;
    transition: height 0.6s ease;
    min-height: 2px;
}

.bar-fill.goal-met {
    background: var(--accent-green);
}

.bar-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.week-summary {
    display: flex;
    justify-content: space-around;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.week-stat {
    text-align: center;
}

.week-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.week-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Week session groups */
.week-day-group {
    margin-bottom: 16px;
}

.week-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 0 4px;
}

.week-day-total {
    color: var(--accent-blue);
    font-weight: 600;
}

/* ---- History View ---- */
.history-header {
    margin-bottom: 16px;
}

.history-header .view-title {
    font-size: 28px;
    font-weight: 700;
}

.history-date-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 8px;
}

.history-nav-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.history-nav-btn:active {
    background: var(--bg-elevated);
}

.history-date-center {
    text-align: center;
}

.history-day-label {
    font-weight: 600;
    font-size: 17px;
}

.history-date-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.history-date-input-row {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.history-date-input {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
}

.history-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

.section-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-green);
    background: rgba(48, 209, 88, 0.12);
    padding: 3px 10px;
    border-radius: 12px;
}

.plan-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}



/* ---- History Tabs ---- */
.history-tabs {
    display: flex;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
}

.history-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.history-tab.active {
    background: var(--accent-blue);
    color: white;
}

[data-theme="light"] .history-tabs {
    background: #FFFFFF;
    border-color: rgba(0,0,0,0.08);
}


