/* Modal dialog styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalFadeIn 0.2s ease-out;
}

/* Gwyneth theme modal overlay */
[data-theme="gwyneth"] .modal-overlay {
    background: rgba(167, 139, 250, 0.25);
}

.modal-dialog {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 400px;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

/* Gwyneth theme modal - clean and simple */
[data-theme="gwyneth"] .modal-dialog {
    background-color: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(167, 139, 250, 0.4);
}

[data-theme="gwyneth"] .settings-modal {
    background-color: rgba(255, 255, 255, 0.98);
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.modal-body p {
    margin: 0 0 1rem 0;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-actions {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
    min-width: 120px;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    max-width: 400px;
    font-weight: 500;
    animation: notificationSlideIn 0.3s ease-out;
}

.notification-success {
    background-color: var(--success-color);
    color: white;
}

.notification-error {
    background-color: var(--danger-color);
    color: white;
}

.notification-info {
    background-color: var(--accent-color);
    color: white;
}

.notification-fade-out {
    animation: notificationFadeOut 0.3s ease-in forwards;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Settings Modal Styles */
.settings-modal {
    min-width: 700px;
    max-width: 800px;
}

.settings-modal .modal-body {
    padding: 0;
    max-height: 70vh;
    overflow: hidden;
}

.settings-menu {
    display: flex;
    min-height: 400px;
}

.settings-sidebar {
    width: 200px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1rem 0;
    flex-shrink: 0;
}

.settings-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-align: left;
}

.settings-menu-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.settings-menu-item.active {
    background-color: var(--accent-color-alpha);
    color: var(--accent-color);
    font-weight: 500;
}

.settings-menu-item svg {
    flex-shrink: 0;
}

.settings-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 70vh;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-section h4 {
    margin: 0 0 1.25rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-value {
    flex-shrink: 0;
}

.setting-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 0.5rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 500;
}

.theme-option:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.theme-option.active {
    border-color: var(--accent-color);
    background-color: var(--accent-color-alpha);
    color: var(--accent-color);
}

.theme-option svg {
    flex-shrink: 0;
}

.setting-info label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    cursor: pointer;
}

.setting-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--accent-color);
}

/* Warning Card */
.warning-card {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: var(--warning-bg);
    border: 2px solid var(--warning-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    z-index: 9999;
    animation: notificationSlideIn 0.3s ease-out;
    transition: opacity 0.3s ease;
}

.warning-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--warning-text);
    font-weight: 600;
}

.warning-card-icon {
    font-size: 1.25rem;
}

.warning-card-body {
    color: var(--warning-text);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.warning-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.warning-card-actions .btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
}
