/* settings.css */

/* Reuse variables from dashboard.css if available, or define locally if standalone */
:root {
    --primary-color: #0ab39c;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f3f4f6;
}

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-header p {
    color: var(--text-secondary);
}

.setting-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-light);
    /* Default: Grey/Prefilled look */
    transition: all 0.2s;
}

/* Dirty State: User has modified the value */
.form-input.is-dirty {
    background-color: white;
    border-color: var(--primary-color);
    border-left-width: 4px;
    /* Stronger visual cue */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    /* Always white on focus for readability */
    box-shadow: 0 0 0 3px rgba(10, 179, 156, 0.1);
}

.helper-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Range Slider Styling */
.range-container {
    padding: 10px 0;
}

.range-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.range-value {
    font-weight: 600;
    color: var(--primary-color);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    /* Required for Chrome/Safari/Edge */
    appearance: none;
    /* Standard property */
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.actions-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-save {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-save:hover {
    background: #089682;
    transform: translateY(-1px);
}

.btn-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    color: #4ade80;
}

/* Mobile Specific */
@media (max-width: 768px) {
    .settings-container {
        padding: 16px;
    }

    .section-title {
        font-size: 16px;
    }
}