/**
 * css/features/history.css
 * Interview history section on the home page
 */

/* =============================================================================
   HISTORY SECTION
   ============================================================================= */
.history-section {
    margin: 2rem 0;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.history-header:hover {
    background: var(--bg-tertiary);
}

.history-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.history-content {
    transition: all 0.3s ease;
}

.history-content.collapsed {
    display: none;
}

/* History items list */
.history-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 450px;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.history-items::-webkit-scrollbar { width: 5px; }
.history-items::-webkit-scrollbar-track { background: transparent; }
.history-items::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
.history-items::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

.history-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.history-item-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-item-icon {
    font-size: 1.5rem;
}

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-position {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-item-score {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.history-item-score.good { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.history-item-score.fair { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.history-item-score.poor { background: rgba(239, 68, 68, 0.15); color: var(--error); }

/* History item actions */
.history-item-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

.history-delete-btn {
    color: var(--text-secondary) !important;
}

.history-delete-btn:hover {
    color: var(--error) !important;
}

/* History footer */
.history-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.history-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}