/* History Section Layout */
.history-section {
    @apply flex-1 flex flex-col min-w-0;
    border-left: 1px solid var(--border-primary);
}

.history-container {
    @apply overflow-hidden flex flex-col h-full;
    background: var(--bg-primary);
    border-radius: 0;
    box-shadow: none;
    border-left: 1px solid var(--border-primary);
}

.history-header {
    @apply flex justify-between items-center relative;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

/* Search mode toggle states */
.history-header.search-mode .history-title {
    display: none;
}

.history-header.search-mode .search-button {
    display: none;
}

.history-header:not(.search-mode) .search-overlay {
    display: none;
}

.history-title {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.history-shortcuts {
    font-size: 10px;
    color: oklch(from var(--color-white) l c h / 0.4);
    font-weight: normal;
}

.history-shortcuts kbd,
.history-kbd {
    font-size: 9px;
    padding: 1px 4px;
}

.history-list-wrapper {
    @apply flex-1 relative overflow-hidden;
}

.history-list {
    height: 100%;
    overflow-y: scroll;
    padding: var(--spacing-sm) 0;
}

/* Hide native scrollbar */
.history-list::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Custom scrollbar indicator */
.custom-scrollbar {
    position: absolute;
    right: 2px;
    top: 0;
    bottom: 0;
    width: 6px;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* Expand hover area with pseudo-element */
.custom-scrollbar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 16px;
    transform: translateX(5px);
}

.custom-scrollbar.visible,
.custom-scrollbar:hover {
    opacity: 1;
}

.custom-scrollbar-thumb {
    background: oklch(from var(--color-white) l c h / 0.2);
    border-radius: 5px;
    min-height: 20px;
}

.custom-scrollbar-thumb:active {
    background: oklch(from var(--color-white) l c h / 0.35);
}

.history-empty {
    @apply text-center;
    padding: var(--spacing-xl) var(--spacing-lg);
    color: var(--text-tertiary);
    font-size: var(--font-size-md);
}
