/* CSS Custom Properties for consistent theming */
:root {
    --color-primary: #c93891;
    --color-secondary: #0147ff;
    --color-text-primary: #2c2c2c;
    --color-text-secondary: #666;
    --color-text-tertiary: #888888;
    --color-border-light: #e0e0e0;
    --color-border-medium: #e6e6e6;
    --color-bg-white: white;
    --color-bg-light: #f2f2f2;
    --color-bg-hover: #dedede;
    --color-danger: #ef4444;
    --color-danger-dark: #dc2626;
    --color-danger-light: #ff6b6b;
    --gradient-primary: linear-gradient(71deg, #c93891 22.69%, #0147ff 110.27%);
}

[data-theme="dark"] {
    --color-text-primary: #e0e0e0;
    --color-text-secondary: #888888;
    --color-text-tertiary: #b0b0b0;
    --color-border-light: #404040;
    --color-border-medium: #333333;
    --color-bg-white: #2a2a2a;
    --color-bg-light: #1e1e1e;
    --color-bg-hover: #333333;
    --color-danger-light: #ff6b9d;
}

.history-sidebar {
    width: 40px;
    background-color: var(--color-bg-white);
    display: flex;
    flex-direction: column;
    height: 50px;
    overflow: hidden;
    transition: 
        width 0.1s ease,
        box-shadow 0.2s ease,
        backdrop-filter 0.2s ease;
    position: relative;
    z-index: 100;
    position: absolute;
    /* Initial state - no shadow */
    box-shadow: none;
}

.history-sidebar.expanded {
    width: 18rem;
    border-right: 1px solid var(--color-border-medium);
    height: 100dvh !important;
    z-index: 100 !important;
    /* Enhanced visual effects for expanded state */
    box-shadow: 
        2px 0 8px rgba(0, 0, 0, 0.1),
        4px 0 16px rgba(0, 0, 0, 0.05),
        8px 0 24px rgba(0, 0, 0, 0.03),
        inset -1px 0 0 rgba(255, 255, 255, 0.1); /* Subtle inner glow */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* position: relative; */
    /* Add subtle background gradient for depth */
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.98) 100%);
        @media screen and (max-width: 768px) {
            position: absolute;
        }
}

/* Backdrop overlay for mobile expanded state */
.history-sidebar.expanded::before {
    content: '';
    position: fixed;
    top: 0;
    left: 18rem;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

@media screen and (max-width: 768px) {
    .history-sidebar.expanded::before {
        left: 85%; /* Match mobile sidebar width */
        opacity: 1;
        pointer-events: auto;
    }
    
    .history-sidebar.expanded {
        /* Enhanced mobile shadow */
        box-shadow: 
            2px 0 12px rgba(0, 0, 0, 0.15),
            4px 0 20px rgba(0, 0, 0, 0.08),
            8px 0 32px rgba(0, 0, 0, 0.05);
    }
}

.history-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 6px;
    top: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #c93891;
    cursor: pointer;
    z-index: 101;
    transition: all 0.2s ease;
}

.history-toggle-btn svg {
    width: 22px;
    height: 22px;
}

.history-toggle-btn:hover {
    background: rgba(201, 56, 145, 0.08);
    color: #c93891;
}

.history-toggle-btn:active {
    transform: scale(0.95);
}

.sidebar-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

.sidebar-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 20px;
    color: #555;
    cursor: pointer;
}

.sidebar-icon.active {
    color: #c93891;
}

.sidebar-content {
    width: 100%;
    display: none;
    background-color: var(--color-bg-light);
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-right: 1px solid #e6e6e6;
    flex-direction: column;
    overflow: hidden;
}

.history-sidebar.expanded .sidebar-content {
    display: flex;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 20px;
    white-space: nowrap;
}

.search-icon {
    color: #333;
    font-size: 24px;
}

.new-task-button {
    margin: 10px 10px 10px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
}

.new-task-button .plus-btn {
    color: white;
    fill: #fff;
    font-size: 15px;
    font-weight: 600;
}

.new-task-button span {
    font-weight: 500;
    font-size: 13.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.new-task-button:hover {
    background: linear-gradient(71deg, rgba(201, 56, 145, 0.12) 22.69%, rgba(1, 71, 255, 0.31) 110.27%);
    transition: background 0.3s ease;
}

.new-task-button i {
    margin-right: 10px;
}

.new-btn-background {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Container Styles */
.search-container {
    padding: 0 12px;
    margin-bottom: 8px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 10px;
    color: var(--color-text-tertiary);
    pointer-events: none;
    transition: color 0.2s ease;
}

.search-input {
    width: 100%;
    padding: 8px 32px 8px 32px;
    font-size: 14px;
    color: var(--color-text-primary);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: var(--color-text-tertiary);
}

.search-input:focus {
    border-color: var(--color-border-light);
}

.search-input:focus + .search-icon,
.search-input-wrapper:focus-within .search-icon {
    color: var(--color-primary);
}

.search-clear-btn {
    position: absolute;
    right: 6px;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text-primary);
}

/* No results message */
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--color-text-secondary);
    font-size: 13px;
    text-align: center;
    gap: 8px;
}

.search-no-results-icon {
    color: var(--color-text-tertiary);
    opacity: 0.6;
}

/* Search loading state */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.search-loading .pagination-loading {
    color: #888888;
}

.search-loading .pagination-spinner i {
    color: #888888;
}

/* Dark mode search styles */
[data-theme="dark"] .search-input {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .search-input::placeholder {
    color: #888888;
}

[data-theme="dark"] .search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(201, 56, 145, 0.2);
}

[data-theme="dark"] .search-input-wrapper .search-icon {
    color: #888888;
}

[data-theme="dark"] .search-clear-btn {
    color: #888888;
}

[data-theme="dark"] .search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

[data-theme="dark"] .search-no-results {
    color: #888888;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px;
    margin-top: 6px;
    /* Mobile/Tauri scroll optimizations */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.history-item {
    display: flex;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    align-items: center;
    margin: 2px 0;
    transition: width 0.1s ease;
}

.history-item:hover {
    background: rgba(201, 56, 145, 0.04);
}

.history-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.history-icon i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 14px;
    opacity: 0.6;
}

.history-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.history-name {
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 400;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Inline editing input */
.history-name-edit {
    width: 100%;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    color: var(--color-text-primary);
    background: var(--color-bg-white);
    border: 1px solid var(--color-secondary);
    border-radius: 4px;
    outline: none;
    box-shadow: 0 0 0 2px rgba(1, 71, 255, 0.1);
}

/* Hide actions when editing */
.history-item.editing .history-actions {
    display: none !important;
}

/* Keep time hidden when editing */
.history-item.editing .history-time {
    display: none;
}

.history-time {
    color: var(--color-text-secondary);
    font-size: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.history-actions {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.history-item:hover .history-actions {
    display: flex;
    opacity: 1;
}

/* Hide time when actions are visible */
.history-item:hover .history-time {
    display: none;
}

/* Show action buttons on mobile with touch events */
.history-item.show-actions .history-actions {
    display: flex;
    opacity: 1;
}

.history-item.show-actions .history-time {
    display: none;
}

.action-btn {
    padding: 6px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #2c2c2c;
}

.action-btn:active {
    background: rgba(0, 0, 0, 0.12);
}

.action-btn i {
    font-size: 15px;
}

.history-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: none;
    z-index: 1000;
    min-width: 180px;
    padding: 6px;
    overflow: hidden;
}

.history-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.history-dropdown.show.dropdown-up {
    bottom: calc(100% + 4px);
    top: auto;
}

.dropdown-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #2c2c2c;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dropdown-item:active {
    background: rgba(0, 0, 0, 0.08);
}

.dropdown-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.dropdown-item.delete-item {
    color: var(--color-danger);
}

.dropdown-item.delete-item i {
    color: var(--color-danger);
}

.dropdown-item.delete-item:hover {
    background: rgba(239, 68, 68, 0.08);
}

.usage-cost {
    margin-left: auto;
    font-weight: 600;
    color: #c93891;
    font-size: 12px;
    background: rgba(201, 56, 145, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 40px;
    text-align: center;
}

.usage-loading {
    color: #999 !important;
    background: rgba(153, 153, 153, 0.1) !important;
}

.usage-item-loading {
    pointer-events: none;
    opacity: 0.7;
}

.history-preview {
    color: #777;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-top: auto;
}


.profile-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 16px;
    margin-right: 12px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
    overflow: hidden;
}

.profile-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .profile-name {
    color: #e0e0e0;
}

.profile-email {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    max-width: 200px;
}

[data-theme="dark"] .profile-email {
    color: #999;
}

.chat-section-view{
    flex: 0 0 0% !important;
}

/* Dark mode styles for history sidebar */
[data-theme="dark"] .history-sidebar {
    background-color: #1e1e1e;
    border-right: 1px solid #333333;
}

[data-theme="dark"] .history-sidebar.expanded {
    /* Enhanced dark theme shadow effects */
    box-shadow: 
        2px 0 12px rgba(0, 0, 0, 0.3),
        4px 0 20px rgba(0, 0, 0, 0.2),
        8px 0 32px rgba(0, 0, 0, 0.1),
        inset -1px 0 0 rgba(255, 255, 255, 0.05); /* Subtle inner glow for dark mode */
    border-right: 1px solid #404040;
    /* Dark theme background gradient */
    background: linear-gradient(90deg, 
        rgba(30, 30, 30, 1) 0%, 
        rgba(30, 30, 30, 0.98) 100%);
}

[data-theme="dark"] .history-sidebar.expanded::before {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

@media screen and (max-width: 768px) {
    [data-theme="dark"] .history-sidebar.expanded {
        /* Enhanced dark mobile shadow */
        box-shadow: 
            2px 0 16px rgba(0, 0, 0, 0.4),
            4px 0 24px rgba(0, 0, 0, 0.25),
            8px 0 40px rgba(0, 0, 0, 0.15);
    }
}

[data-theme="dark"] .history-toggle-btn {
    color: #999;
}

[data-theme="dark"] .history-toggle-btn:hover {
    background: rgba(201, 56, 145, 0.15);
    color: #c93891;
}

[data-theme="dark"] .sidebar-content {
    background-color: #1e1e1e;
    border-right: 1px solid #333333;
}

[data-theme="dark"] .history-item:hover {
    background: rgba(201, 56, 145, 0.1);
}

[data-theme="dark"] .history-name {
    color: #e0e0e0;
}

[data-theme="dark"] .history-name-edit {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 2px rgba(1, 71, 255, 0.2);
}

[data-theme="dark"] .history-time {
    color: #888888;
}

[data-theme="dark"] .history-preview {
    color: #888888;
}

[data-theme="dark"] .action-btn {
    color: #e0e0e0;
}

[data-theme="dark"] .action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .action-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .history-dropdown {
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .dropdown-item:active {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .dropdown-item i {
    color: #b0b0b0;
}

[data-theme="dark"] .dropdown-item.delete-item {
    color: #ff6b6b;
}

[data-theme="dark"] .dropdown-item.delete-item i {
    color: #ff6b6b;
}

[data-theme="dark"] .dropdown-item.delete-item:hover {
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .new-task-button {
    background: rgba(201, 56, 145, 0.05);
}

[data-theme="dark"] .new-task-button:hover {
    background: rgba(201, 56, 145, 0.1);
}


[data-theme="dark"] .bottom-icons {
    color: #888888;
}

[data-theme="dark"] .bottom-icon:hover {
    color: #e0e0e0;
    background: #333333;
}

/* Dark mode styles for usage */
[data-theme="dark"] .usage-cost {
    color: #ff6b9d;
    background: rgba(255, 107, 157, 0.15);
}

/* ============================================
   MODAL STYLES
   ============================================ */

/* Edit Modal Styles */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.edit-modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.edit-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.edit-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
}

.edit-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.edit-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #2c2c2c;
}

.edit-modal-body {
    margin-bottom: 20px;
}

.edit-modal-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #2c2c2c;
    margin-bottom: 8px;
}

.edit-modal-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.edit-modal-input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(1, 71, 255, 0.1);
}

.edit-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.edit-modal-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-modal-btn.cancel {
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
}

.edit-modal-btn.cancel:hover {
    background: var(--color-border-light);
}

.edit-modal-btn.save {
    background: var(--gradient-primary);
    color: white;
}

.edit-modal-btn.save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 56, 145, 0.3);
}

.edit-modal-btn.save:active {
    transform: translateY(0);
}

/* ----------------------------------------
   Delete Confirmation Modal Styles
   ---------------------------------------- */
.delete-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.delete-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.delete-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-danger);
    font-size: 24px;
    flex-shrink: 0;
}

.delete-modal-text {
    flex: 1;
}

.delete-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 8px;
}

.delete-modal-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.delete-modal-conversation-name {
    font-weight: 500;
    color: #2c2c2c;
    word-break: break-word;
    overflow-wrap: break-word;
}

.delete-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.delete-modal-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-modal-btn.cancel {
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
}

.delete-modal-btn.cancel:hover {
    background: var(--color-border-light);
}

.delete-modal-btn.delete {
    background: var(--color-danger);
    color: white;
}

.delete-modal-btn.delete:hover {
    background: var(--color-danger-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.delete-modal-btn.delete:active {
    transform: translateY(0);
}

/* ----------------------------------------
   Dark Mode Modal Styles
   ---------------------------------------- */
[data-theme="dark"] .edit-modal,
[data-theme="dark"] .delete-modal {
    background: #2a2a2a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .edit-modal-title,
[data-theme="dark"] .delete-modal-title,
[data-theme="dark"] .edit-modal-label {
    color: #e0e0e0;
}

[data-theme="dark"] .edit-modal-close {
    color: #e0e0e0;
}

[data-theme="dark"] .edit-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .edit-modal-input {
    background: #1e1e1e;
    border-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .edit-modal-input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(1, 71, 255, 0.2);
}

[data-theme="dark"] .edit-modal-btn.cancel,
[data-theme="dark"] .delete-modal-btn.cancel {
    background: #333333;
    color: #e0e0e0;
}

[data-theme="dark"] .edit-modal-btn.cancel:hover,
[data-theme="dark"] .delete-modal-btn.cancel:hover {
    background: #404040;
}

[data-theme="dark"] .delete-modal-description {
    color: #888888;
}

[data-theme="dark"] .delete-modal-conversation-name {
    color: #e0e0e0;
}

[data-theme="dark"] .delete-modal-icon {
    background: rgba(239, 68, 68, 0.2);
}

/* ============================================
   PAGINATION STYLES
   ============================================ */

/* Pagination Loading Indicator */
.pagination-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 12px;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.pagination-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-spinner i {
    color: #888888;
    font-size: 14px;
}

/* No More Conversations Message */
.no-more-conversations {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    color: var(--color-text-tertiary);
    font-size: 12px;
    border-top: 1px solid var(--color-border-light);
    margin-top: 8px;
}

.no-more-conversations span {
    opacity: 0.7;
}

/* Empty State Styles */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--color-text-secondary);
    font-size: 14px;
    text-align: center;
}

/* Dark Mode Pagination Styles */
[data-theme="dark"] .pagination-loading {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .pagination-spinner i {
    color: #888888;
}

[data-theme="dark"] .no-more-conversations {
    color: var(--color-text-tertiary);
    border-top-color: var(--color-border-light);
}

[data-theme="dark"] .empty-state {
    color: var(--color-text-secondary);
}