/* =========================================
   FEATURE 34: SETTINGS PAGE STYLES
   ========================================= */

/* --- PAGE CONTAINER --- */
#settings-page {
    display: none;
    /* Hidden by default */
    width: 100%;
    height: 100%;
    padding: 30px;
    box-sizing: border-box;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--panel-color);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* --- HEADER --- */
.settings-header {
    padding: 25px 40px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
}

/* --- BODY --- */
.settings-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* --- SECTIONS --- */
.settings-section h3 {
    font-size: 0.95rem;
    color: var(--brand-yellow);
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* --- ROW ITEMS --- */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.setting-info {
    flex: 1;
    padding-right: 40px;
}

.setting-label {
    display: block;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
    margin-bottom: 6px;
}

.setting-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- CONTROLS: TOGGLES --- */
.setting-toggle {
    position: relative;
    width: 56px;
    height: 30px;
    display: inline-block;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    /* Dark glass track */
    transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    /* Inactive knob white */
    transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked+.toggle-slider {
    background-color: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

input:checked+.toggle-slider:before {
    transform: translateX(26px);
    background-color: var(--brand-yellow);
    /* Active knob yellow */
}

/* --- CONTROLS: BUTTONS --- */
.btn-setting {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 140px;
}

.btn-setting:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-1px);
}

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

/* Soft Reset (Orange) */
.btn-soft-reset {
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
}

.btn-soft-reset:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #fbbf24;
}

/* Hard Reset (Red) */
.btn-hard-reset {
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

.btn-hard-reset:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #f87171;
}

/* --- BACKUP SECTION --- */
.backup-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.backup-meta {
    text-align: right;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.backup-timestamp {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
    font-style: italic;
}

/* --- FOOTER (Version) --- */
.about-footer {
    text-align: center;
    padding-top: 40px;
    margin-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    opacity: 0.6;
}

.app-version {
    font-size: 0.9rem;
    margin-top: 5px;
    font-family: monospace;
}

/* --- TRANSITION OVERLAY (The "Curtain") --- */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0f172a;
    /* Main app background color */
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Spinner inside the curtain */
.transition-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--brand-yellow);
    animation: spin 1s ease-in-out infinite;
}

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

/* --- TRANSITION OVERLAY (The Curtain) --- */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0f172a;
    /* Matches main background */
    z-index: 10000;
    /* Highest layer */

    /* Default State: Hidden & Click-through */
    opacity: 0;
    pointer-events: none;

    display: flex;
    justify-content: center;
    align-items: center;

    /* Smooth Fade */
    transition: opacity 0.4s ease-in-out;
}

/* Active State: Visible & Blocking */
.transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Spinner inside the curtain */
.transition-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--brand-yellow);
    animation: spin 1s ease-in-out infinite;
}

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

/* --- UNIFIED DROPDOWN STYLE (From Feature 22) --- */
.journal-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 8px 35px 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    cursor: pointer;
    outline: none;

    /* Custom Brand Yellow Arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23FFCC00%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;

    transition: all 0.2s;
}

.journal-select:hover {
    background-color: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.journal-select:focus {
    border-color: var(--brand-yellow);
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.1);
}

.journal-select option {
    background-color: #1e293b;
    color: #fff;
    padding: 10px;
}