/* Interview Prep — Redesigned v6.5 */

/* ========== MAIN LAYOUT ========== */
.interview-prep-main { background: var(--gray-100); min-height: calc(100vh - var(--header-height, 64px)); }
.interview-prep-main .container { max-width: 900px; margin: 0 auto; padding: var(--space-6); }
.interview-prep-main .container:has(.ip-practice-layout) { max-width: 1100px; }

/* ========== LANDING (visitors) ========== */
.ip-landing { text-align: center; padding: var(--space-10) 0; }
.ip-landing h1 { font-size: var(--text-2xl); font-weight: var(--font-bold); color: var(--gray-900); margin-bottom: var(--space-3); }
.ip-landing > p { font-size: var(--text-sm); color: var(--gray-600); margin-bottom: var(--space-8); max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.ip-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-8); text-align: left; }
.ip-feature { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); }
.ip-feature-icon { width: 40px; height: 40px; background: var(--primary-lighter, #EFF6FF); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-3); color: var(--primary); font-size: var(--text-base); }
.ip-feature h3 { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--gray-900); margin-bottom: var(--space-2); }
.ip-feature p { font-size: var(--text-xs); color: var(--gray-600); line-height: 1.6; }
.ip-how { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); margin-bottom: var(--space-6); text-align: left; }
.ip-how h3 { font-size: var(--text-base); font-weight: var(--font-bold); color: var(--gray-900); margin-bottom: var(--space-4); text-align: center; }
.ip-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.ip-step { text-align: center; }
.ip-step-num { width: 32px; height: 32px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: var(--font-bold); margin: 0 auto var(--space-2); }
.ip-step-title { font-size: var(--text-xs); font-weight: var(--font-semibold); color: var(--gray-900); margin-bottom: var(--space-1); }
.ip-step-desc { font-size: 10px; color: var(--gray-500); line-height: 1.5; }

/* ========== STATS STRIP ========== */
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-bottom: var(--space-5); }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4); text-align: center; }
.stat-card .stat-value { font-size: var(--text-xl); font-weight: var(--font-bold); color: var(--primary); }
.stat-card .stat-label { font-size: 10px; color: var(--gray-500); text-transform: uppercase; margin-top: 2px; }

/* ========== SESSION CARDS (landing grid) — Redesigned ========== */
.sessions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sc-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.sc-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,0.08); }
.sc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sc-score-circle { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--gray-400); flex-shrink: 0; }
.sc-score-circle.high { border-color: #10B981; color: #065F46; }
.sc-score-circle.mid { border-color: #F59E0B; color: #92400E; }
.sc-score-circle.low { border-color: #EF4444; color: #991B1B; }
.sc-info { flex: 1; min-width: 0; }
.sc-title { font-size: 13px; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.sc-meta { font-size: 11px; color: var(--gray-400); }
.sc-delete { background: none; border: none; color: var(--gray-300); cursor: pointer; padding: 6px; border-radius: 6px; font-size: 12px; flex-shrink: 0; transition: all 0.15s; }
.sc-delete:hover { color: var(--error); background: #FEE2E2; }
.sc-progress { display: flex; align-items: center; gap: 8px; }
.sc-progress-bar { flex: 1; height: 4px; background: var(--gray-100); border-radius: 2px; overflow: hidden; }
.sc-progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width 0.3s; }
.sc-progress-text { font-size: 10px; color: var(--gray-400); white-space: nowrap; }

/* Stats strip — cleaner */
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ========== PRACTICE VIEW LAYOUT ========== */
.ip-practice-layout { display: grid; grid-template-columns: 1fr 260px; gap: 20px; }
.ip-practice-content { min-width: 0; }

/* ========== CATEGORY TABS — Pill Style ========== */
.category-tabs {
    display: flex; gap: 6px; margin-bottom: 16px;
    background: var(--gray-100); padding: 4px; border-radius: 10px;
    border-bottom: none !important;
    overflow-x: auto;
}
.cat-tab {
    flex: 1; padding: 8px 0; border: none; border-radius: 8px;
    background: transparent; font-size: 12px; font-weight: 600;
    color: var(--gray-500); cursor: pointer; font-family: var(--font-family);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all 0.2s; white-space: nowrap; border-bottom: none !important;
}
.cat-tab:hover { color: var(--gray-700); }
.cat-tab.active {
    background: var(--white); color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-bottom: none !important;
}
.cat-tab .tab-count {
    font-size: 10px; background: var(--gray-200); color: var(--gray-500);
    padding: 1px 6px; border-radius: 10px;
}
.cat-tab.active .tab-count { background: #DBEAFE; color: var(--primary); }

/* ========== PROGRESS STRIP ========== */
.ip-progress-strip {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
    padding: 10px 14px; background: var(--white);
    border: 1px solid var(--border); border-radius: 10px;
}
.ip-progress-bar { flex: 1; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.ip-progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s; }
.ip-progress-text { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
.ip-progress-text strong { color: var(--primary); }

/* ========== QUESTION CARDS — No Left Border ========== */
.question-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; margin-bottom: 12px; overflow: hidden;
    transition: border-color 0.15s; border-left: none;
}
.question-card:hover { border-color: var(--gray-300); }

.question-header {
    padding: 16px 18px; display: flex; gap: 12px;
    align-items: flex-start; cursor: pointer;
}
.question-header:hover { background: transparent; }

.q-num-badge {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--gray-100); display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 700;
    color: var(--gray-500); flex-shrink: 0;
}
.question-card.answered .q-num-badge { background: #D1FAE5; color: #065F46; }

.question-text { font-size: 14px; font-weight: 500; color: var(--gray-900); line-height: 1.6; flex: 1; }

.question-status {
    flex-shrink: 0; font-size: 10px; font-weight: 600;
    padding: 3px 8px; border-radius: 6px;
}
.question-status.status-pending { background: var(--gray-100); color: var(--gray-400); }
.question-status.status-done { background: #D1FAE5; color: #065F46; }

/* Hint */
.question-hint {
    padding: 0 18px 12px 58px; font-size: 12px;
    color: var(--gray-400); line-height: 1.5;
}
.question-hint i { color: #D97706; margin-right: 4px; }

/* Answer area */
.answer-area { padding: 0 18px 16px 18px; }
.answer-textarea {
    width: 100%; min-height: 100px; padding: 12px;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--font-family); font-size: 13px;
    resize: vertical; line-height: 1.7; box-sizing: border-box;
    transition: border-color 0.2s;
}
.answer-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.answer-textarea::placeholder { color: var(--gray-300); }
.answer-submit-row { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ========== FEEDBACK PANEL — Redesigned ========== */
.feedback-panel { padding: 16px 18px; background: var(--gray-100); border-top: 1px solid var(--border); }

.fb-score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fb-score-box {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700;
}
.fb-score-box.high { background: #D1FAE5; color: #065F46; }
.fb-score-box.mid { background: #FEF3C7; color: #92400E; }
.fb-score-box.low { background: #FEE2E2; color: #991B1B; }
.fb-score-label { font-size: 13px; font-weight: 600; }
.fb-score-sublabel { font-size: 11px; color: var(--gray-400); }

.fb-your-answer {
    font-size: 12px; color: var(--gray-500); line-height: 1.6;
    padding: 10px 12px; background: var(--white);
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 14px;
}
.fb-your-answer-label { font-size: 10px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; margin-bottom: 4px; }

.fb-section { margin-bottom: 12px; }
.fb-section-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.fb-section-title.strengths { color: #065F46; }
.fb-section-title.improve { color: #92400E; }
.fb-section-title.sample { color: var(--primary); }
.fb-list { list-style: none; padding: 0; margin: 0; }
.fb-list li {
    font-size: 13px; color: var(--gray-600); line-height: 1.6;
    padding: 2px 0 2px 16px; position: relative;
}
.fb-list li::before {
    content: ''; position: absolute; left: 0; top: 10px;
    width: 6px; height: 6px; border-radius: 50%;
}
.fb-list.green li::before { background: #10B981; }
.fb-list.orange li::before { background: #F59E0B; }
.fb-sample {
    font-size: 13px; color: var(--gray-600); line-height: 1.7;
    padding: 12px; background: var(--white);
    border: 1px solid var(--border); border-radius: 8px;
}

/* ========== HISTORY SIDEBAR ========== */
.ip-history-sidebar { position: sticky; top: calc(var(--header-height, 56px) + 16px); align-self: start; }
.ip-hist-panel { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ip-hist-hdr { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.ip-hist-hdr h3 { font-size: 13px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 6px; color: var(--gray-700); }
.ip-hist-hdr h3 i { color: var(--gray-400); font-size: 12px; }
.ip-hist-list { max-height: calc(100vh - 180px); overflow-y: auto; }
.ip-hist-card { display: block; padding: 10px 14px; border-bottom: 1px solid var(--gray-100); cursor: pointer; text-decoration: none; color: inherit; transition: background 0.15s; }
.ip-hist-card:hover { background: var(--gray-100); }
.ip-hist-card:last-child { border-bottom: none; }
.ip-hist-card.active { background: #EFF6FF; border-left: 3px solid var(--primary); }
.ip-hc-title { font-size: 12px; font-weight: 600; color: var(--gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.ip-hc-meta { font-size: 10px; color: var(--gray-400); margin-bottom: 4px; }
.ip-hc-stats { display: flex; gap: 8px; font-size: 10px; }
.ip-hc-stats span { display: flex; align-items: center; gap: 3px; }
.ip-hc-score { color: var(--primary); font-weight: 700; }
.ip-hc-answered { color: var(--gray-500); }
.ip-hc-progress { height: 3px; background: var(--gray-200); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.ip-hc-progress-fill { height: 100%; background: var(--primary); border-radius: 2px; }

/* ========== MODAL ========== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; align-items: center; justify-content: center; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }

/* ========== ALERTS ========== */
.alert { padding: var(--space-3) var(--space-4); border-radius: var(--radius); margin-bottom: var(--space-3); font-size: var(--text-xs); display: flex; align-items: center; gap: var(--space-2); }
.alert-success { background: var(--success-light, #D1FAE5); color: var(--success, #059669); }
.alert-error { background: var(--error-light, #FEE2E2); color: var(--error); }
.alert-warning { background: #FEF3C7; color: #92400E; }

/* ========== BUTTONS ========== */
.btn-primary { background: var(--primary); color: var(--white); border: 1px solid var(--primary); }
.btn-primary:hover { background: var(--primary-hover, #1D4ED8); }
.btn-ghost { background: transparent; color: var(--gray-600); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: var(--text-xs); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .ip-practice-layout { grid-template-columns: 1fr; }
    .ip-history-sidebar { position: static; order: -1; }
    .ip-hist-list { max-height: none; display: flex; overflow-x: auto; gap: 0; }
    .ip-hist-card { min-width: 200px; flex-shrink: 0; border-bottom: none; border-right: 1px solid var(--gray-100); }
    .category-tabs { flex-wrap: nowrap; }
    .cat-tab { flex: 0 0 auto; padding: 8px 14px; }
}
@media (max-width: 768px) {
    .interview-prep-main .container { padding: var(--space-4); max-width: 100%; }
    .ip-features, .stats-strip { grid-template-columns: 1fr; }
    .ip-steps { grid-template-columns: repeat(2, 1fr); }
    .question-header { padding: 12px 14px; }
    .question-hint { padding-left: 46px; }
    .answer-area { padding: 0 14px 14px; }
}
