/* START SEARCH HISTORY STYLES */

html.dark-mode .kol-search-history-section,
html.light-mode .kol-search-history-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

html.dark-mode .kol-search-history-controls,
html.light-mode .kol-search-history-controls {
    display: flex;
    gap: 8px;
    padding: 8px 7px;
    border-bottom: 1px solid var(--bp-border-default);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
}

html.dark-mode .kol-edit-history-btn,
html.light-mode .kol-edit-history-btn {
    flex: 1;
    display: block;
    text-align: center;
    padding: 8px 12px;
    color: var(--bp-accent-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    background: transparent;
}

html.dark-mode .kol-edit-history-btn:hover,
html.light-mode .kol-edit-history-btn:hover {
    background: #292929;
    text-decoration: none;
}

html.light-mode .kol-edit-history-btn {
    flex: 1;
    display: block;
    text-align: center;
    padding: 8px 12px;
    color: var(--bp-accent-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    background: transparent;
}

html.light-mode .kol-edit-history-btn:hover {
    background: #eaede8;
    text-decoration: none;
}

html.dark-mode .kol-clear-all-history-btn,
html.light-mode .kol-clear-all-history-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

html.dark-mode .kol-clear-all-history-btn:hover,
html.light-mode .kol-clear-all-history-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
}



html.dark-mode .kol-search-history-items,
html.light-mode .kol-search-history-items {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

html.dark-mode .kol-search-history-items::-webkit-scrollbar,
html.light-mode .kol-search-history-items::-webkit-scrollbar {
    display: none;
}

html.dark-mode .kol-search-history-item,
html.light-mode .kol-search-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 7px;
    margin: 0 -7px;
    padding-left: 7px;
    padding-right: 7px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    color: var(--bp-text-secondary);
    border-radius: 0;
    position: relative;
    gap: 8px;
}

html.dark-mode .kol-search-history-item:hover {
    background: #292929;
    color: var(--bp-accent-gold);
}

html.light-mode .kol-search-history-item:hover {
    background: #e8f5e9;
    color: var(--bp-accent-primary);
}

html.dark-mode .kol-history-item-icon,
html.light-mode .kol-history-item-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

html.dark-mode .kol-history-icon,
html.light-mode .kol-history-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bp-text-secondary);
    font-size: 14px;
    flex-shrink: 0;
}

html.dark-mode .kol-history-avatar,
html.light-mode .kol-history-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

html.dark-mode .kol-search-history-item-content,
html.light-mode .kol-search-history-item-content {
    flex: 1;
    min-width: 0;
}

html.dark-mode .kol-history-query,
html.light-mode .kol-history-query {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    margin-bottom: 0;
}

html.dark-mode .kol-delete-search-btn,
html.light-mode .kol-delete-search-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--bp-text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

html.dark-mode .kol-delete-search-btn:hover,
html.light-mode .kol-delete-search-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff6b6b;
}

html.dark-mode .kol-search-history-more,
html.light-mode .kol-search-history-more {
    text-align: right;
    padding: 8px 7px;
    border-top: 1px solid var(--bp-border-default);
}

html.dark-mode .kol-search-history-more a,
html.light-mode .kol-search-history-more a {
    font-size: 12px;
    color: var(--bp-accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

html.dark-mode .kol-search-history-more a:hover,
html.light-mode .kol-search-history-more a:hover {
    color: var(--bp-accent-gold);
    text-decoration: underline;
}

html.dark-mode .kol-search-dropdown,
html.light-mode .kol-search-dropdown {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

html.dark-mode .kol-search-dropdown-inner,
html.light-mode .kol-search-dropdown-inner {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
}

/* Search History Management Page */
html.dark-mode .kol-search-history-container,
html.light-mode .kol-search-history-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

html.dark-mode .kol-search-history-header,
html.light-mode .kol-search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bp-border-default);
}

html.dark-mode .kol-search-history-header h2,
html.light-mode .kol-search-history-header h2 {
    margin: 0;
    font-size: 28px;
    color: var(--bp-text-primary);
}

html.dark-mode .kol-clear-all-btn,
html.light-mode .kol-clear-all-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

html.dark-mode .kol-clear-all-btn:hover,
html.light-mode .kol-clear-all-btn:hover {
    background: #b71c1c;
}

html.dark-mode .kol-history-loading,
html.dark-mode .kol-no-history,
html.dark-mode .kol-history-error,
html.light-mode .kol-history-loading,
html.light-mode .kol-no-history,
html.light-mode .kol-history-error {
    text-align: center;
    padding: 40px;
    color: var(--bp-text-muted);
    font-size: 16px;
}

html.dark-mode .kol-history-error,
html.light-mode .kol-history-error {
    color: #ff6b6b;
}

html.dark-mode .kol-history-items,
html.light-mode .kol-history-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

html.dark-mode .kol-history-card,
html.light-mode .kol-history-card {
    background: var(--bp-primary-bg);
    border: 1px solid var(--bp-border-default);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

html.dark-mode .kol-history-card:hover,
html.light-mode .kol-history-card:hover {
    border-color: var(--bp-accent-primary);
}

html.dark-mode .kol-history-card-header,
html.light-mode .kol-history-card-header {
    background: var(--bp-secondary-bg);
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--bp-border-default);
}

html.dark-mode .kol-history-card-content,
html.light-mode .kol-history-card-content {
    display: flex;
    flex-direction: column;
}

html.dark-mode .kol-history-card-item,
html.light-mode .kol-history-card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bp-border-light);
    transition: background 0.2s ease;
}

html.dark-mode .kol-history-card-item:last-child,
html.light-mode .kol-history-card-item:last-child {
    border-bottom: none;
}

html.dark-mode .kol-history-card-item:hover,
html.light-mode .kol-history-card-item:hover {
    background: var(--bp-secondary-bg);
}

html.dark-mode .kol-history-card-item-content,
html.light-mode .kol-history-card-item-content {
    flex: 1;
}

html.dark-mode .kol-history-query,
html.light-mode .kol-history-query {
    font-size: 14px;
    font-weight: 500;
    color: var(--bp-text-primary);
    text-decoration: none;
    margin-bottom: 0;
    display: block;
}

html.dark-mode .kol-history-query:hover,
html.light-mode .kol-history-query:hover {
    color: var(--bp-accent-primary);
}

html.dark-mode .kol-history-card-meta,
html.light-mode .kol-history-card-meta {
    font-size: 11px;
    color: var(--bp-text-muted);
    display: block;
    margin-top: 3px;
}

html.dark-mode .kol-delete-history-btn,
html.light-mode .kol-delete-history-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 16px;
    background: transparent;
    border: none;
    color: var(--bp-text-muted);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

html.dark-mode .kol-delete-history-btn:hover,
html.light-mode .kol-delete-history-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff6b6b;
}

html.dark-mode .kol-search-history-notice,
html.light-mode .kol-search-history-notice {
    background: var(--bp-secondary-bg);
    border: 1px solid var(--bp-border-default);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    color: var(--bp-text-muted);
}

html.dark-mode .kol-search-history-notice p,
html.light-mode .kol-search-history-notice p {
    margin: 0;
    font-size: 16px;
}

/* END SEARCH HISTORY STYLES */
