/* Settings Page Dark Theme */

/* Force dark background for settings page */
body {
    background: linear-gradient(135deg, #0D1117 0%, #1F2937 50%, #0D1117 100%);
    opacity: 1 !important;
}

/* Force dark theme overrides even when light theme is active */
body.light-theme {
    /* Restore dark theme variables */
    --bg-primary: #0D1117 !important;
    --bg-secondary: #1F2937 !important;
    --text-primary: #FFFFFF !important;
    --text-secondary: #9CA3AF !important;
    --border-color: rgba(75, 85, 99, 0.5) !important;

    background: linear-gradient(135deg, #0D1117 0%, #1F2937 50%, #0D1117 100%) !important;
    color: #FFFFFF !important;
}

/* Overrides for text elements that dashboard.css forces to dark in light mode */
body.light-theme p,
body.light-theme .subtitle,
body.light-theme .setting-info p,
body.light-theme .dashboard-header p {
    color: #9CA3AF !important;
    /* Secondary text color */
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme .dashboard-header h1,
body.light-theme .section-title,
body.light-theme .setting-info h3 {
    color: #FFFFFF !important;
    /* Primary text color */
}

body.light-theme .setting-select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* Override default light backgrounds */
.settings-section {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-title {
    color: #e2e8f0;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.75rem;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.setting-item:hover {
    border-color: #475569;
    background: #1e293b;
}

.setting-info h3 {
    color: #f1f5f9;
    font-size: 0.938rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.setting-info p {
    color: #94a3b8;
    font-size: 0.813rem;
    margin: 0;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Dark theme for select dropdowns */
.setting-select {
    padding: 0.5rem 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.875rem;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.2s;
}

.setting-select:hover {
    border-color: #475569;
    background: #1e293b;
}

.setting-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Toggle switch dark theme */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.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: #334155;
    transition: 0.3s;
    border-radius: 24px;
}

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

input:checked+.toggle-slider {
    background-color: #3b82f6;
}

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

/* Model info styling */
.model-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.current-model {
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.938rem;
}

.model-status {
    color: #10b981;
    font-size: 0.813rem;
    font-weight: 500;
}

/* Settings actions */
.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #334155;
}

/* Button overrides for settings page */
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary:hover:not(.disabled) {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover:not(.disabled) {
    background: #334155;
    border-color: #475569;
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #dc2626;
    border-radius: 8px;
    color: #ef4444;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-danger:hover:not(.disabled) {
    background: rgba(220, 38, 38, 0.1);
    border-color: #ef4444;
}

.btn-primary.disabled,
.btn-secondary.disabled,
.btn-danger.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}