/* Settings Page Styling - Using App Components & Variables */

/* Use app-container, app-header, app-card from components.css */
/* This file only contains settings-specific UI elements */

/* Theme Options - Mobile First */
.theme-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.theme-option {
    width: 100%;
}

/* Theme Options - Tablet and up */
@media (min-width: 576px) {
    .theme-options {
        flex-direction: row;
        gap: 1rem;
    }

    .theme-option {
        flex: 1;
    }
}

.theme-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-label {
    display: block;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid var(--color-border-primary);
    border-radius: var(--card-radius);
    transition: all 0.2s ease;
    background: var(--card-bg);
}

/* Mobile theme preview layout */
.theme-preview-mobile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.theme-info {
    flex: 1;
    min-width: 0;
}

/* Desktop theme preview layout */
@media (min-width: 576px) {
    .theme-label {
        padding: 1rem;
        text-align: center;
    }

    .theme-preview-mobile {
        display: block;
        text-align: center;
    }

    .theme-info {
        margin-top: 0.75rem;
    }
}

.theme-label:hover {
    border-color: var(--color-border-secondary);
    box-shadow: var(--shadow-sm);
}

.theme-radio:checked + .theme-label {
    border-color: var(--color-border-focus);
    background: var(--color-bg-hover);
    box-shadow: 0 2px 8px var(--color-border-focus-shadow);
}

/* Theme Preview - Mobile First */
.theme-preview {
    width: 48px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-border-primary);
    flex-shrink: 0;
}

/* Theme Preview - Desktop */
@media (min-width: 576px) {
    .theme-preview {
        width: 100%;
        height: 64px;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }
}

.theme-preview-header {
    height: 8px;
    background: var(--color-text-secondary);
}

.theme-preview-body {
    height: 28px;
    display: flex;
}

.theme-preview-sidebar {
    width: 12px;
    background: var(--color-border-primary);
}

.theme-preview-content {
    flex: 1;
    background: var(--color-bg-secondary);
}

/* Desktop theme preview sizes */
@media (min-width: 576px) {
    .theme-preview-header {
        height: 16px;
    }

    .theme-preview-body {
        height: 48px;
    }

    .theme-preview-sidebar {
        width: 20px;
    }
}

.theme-preview-light .theme-preview-header {
    background: #007bff;
}

.theme-preview-light .theme-preview-sidebar {
    background: #e9ecef;
}

.theme-preview-light .theme-preview-content {
    background: #ffffff;
}

.theme-preview-dark .theme-preview-header {
    background: #495057;
}

.theme-preview-dark .theme-preview-sidebar {
    background: #343a40;
}

.theme-preview-dark .theme-preview-content {
    background: #212529;
}

.theme-preview-auto .theme-preview-header {
    background: linear-gradient(to right, #007bff 50%, #495057 50%);
}

.theme-preview-auto .theme-preview-sidebar {
    background: linear-gradient(to right, #e9ecef 50%, #343a40 50%);
}

.theme-preview-auto .theme-preview-content {
    background: linear-gradient(to right, #ffffff 50%, #212529 50%);
}

.theme-name {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.theme-description {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.3;
}

/* Desktop theme text */
@media (min-width: 576px) {
    .theme-name {
        font-size: 1rem;
    }
}

/* Custom Toggle Switches */
.settings-toggle {
    position: relative;
    display: inline-block;
}

.settings-switch {
    position: absolute;
    opacity: 0;
}

.settings-switch-label {
    display: block;
    width: 48px;
    height: 28px;
    cursor: pointer;
    position: relative;
}

.settings-switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border-tertiary);
    border-radius: 28px;
    transition: 0.3s;
}

.settings-switch-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    top: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.settings-switch:checked + .settings-switch-label .settings-switch-slider {
    background-color: var(--color-border-focus);
}

.settings-switch:checked + .settings-switch-label .settings-switch-slider::before {
    transform: translateX(20px);
}

.settings-switch:disabled + .settings-switch-label {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Settings Actions - Mobile First */
.settings-actions {
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border-primary);
    margin-top: 1.5rem;
}

/* Settings Actions - Desktop */
@media (min-width: 768px) {
    .settings-actions {
        padding: 2rem 0;
        margin-top: 2rem;
    }
}

/* Settings Notes */
.settings-note {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    margin-top: 1rem;
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

/* Settings Sidebar */
.settings-sidebar {
    padding-left: 2rem;
}

.settings-info-card {
    background: var(--color-bg-secondary);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.settings-info-header i {
    color: var(--color-border-focus);
    font-size: 1.1rem;
}

.settings-info-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--color-text-tertiary);
}

.settings-info-card p {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* Theme Change Notification */
.theme-change-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--color-success);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
    font-weight: 500;
}

.theme-change-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .theme-preview {
        width: 40px;
        height: 30px;
    }

    .theme-preview-header {
        height: 6px;
    }

    .theme-preview-body {
        height: 24px;
    }

    .theme-preview-sidebar {
        width: 10px;
    }
}

/* Password Change Notification */
.password-change-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}

.password-change-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.password-change-notification-success {
    border-left: 4px solid var(--bs-success, #198754);
    color: var(--bs-success, #198754);
}

.password-change-notification-error {
    border-left: 4px solid var(--bs-danger, #dc3545);
    color: var(--bs-danger, #dc3545);
}

@media (max-width: 768px) {
    .password-change-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        font-size: 0.875rem;
    }
}
