﻿/* ═══════════════════════════════════════
   Módulo: Preferências do Perfil
   ═══════════════════════════════════════ */

.pref-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 16px 64px;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
}

/* ── Cabeçalhos ── */
.pref-header {
    margin-bottom: 24px;
}

.pref-main-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.pref-section-header {
    margin-bottom: 16px;
}

    .pref-section-header h3 {
        font-size: 15px;
        font-weight: 600;
        color: #374151;
        margin: 0 0 4px 0;
    }

    .pref-section-header p {
        font-size: 14px;
        color: #4b5563;
        margin: 0;
    }

.pref-section-title-large {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

/* ── Divisores ── */
.pref-divider-main {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

/* ── Cards e Listas ── */
.pref-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .pref-card:last-child {
        margin-bottom: 0;
    }

.pref-card-header-inner {
    padding: 20px 24px 12px;
    border-bottom: 1px solid transparent;
}

.pref-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f3f4f6;
}

    .pref-list-item:last-child {
        border-bottom: none;
    }

.pref-item-column {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

/* ── Textos e Labels ── */
.pref-label-main {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0;
}

.pref-label-sub {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

.pref-label-spacing {
    margin-bottom: 4px;
}

.pref-label-muted {
    font-size: 13px;
    color: #6b7280;
}

/* ── Dropdown (Select Customizado) ── */
.pref-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pref-select {
    width: 100%;
    appearance: none;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 40px 10px 12px;
    font-size: 14px;
    color: #111827;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

    .pref-select:focus {
        border-color: #0ea5e9;
        box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    }

.pref-select-icon {
    position: absolute;
    right: 14px;
    pointer-events: none;
    font-size: 12px;
    color: #6b7280;
}

/* ── Range Slider (Tamanho do Texto) ── */
.pref-range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pref-range-value {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.pref-range-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pref-range-icon-small {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.pref-range-icon-large {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.pref-range-input {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    outline: none;
    accent-color: #111827; /* Pinta a bolinha e o traço de preto no Chrome/Edge/FF */
}

/* ── Toggle Switch (Interruptores) ── */
.pref-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

    .pref-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.pref-slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .3s;
    border-radius: 24px;
}

    .pref-slider-toggle:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

.pref-toggle input:checked + .pref-slider-toggle {
    background-color: #111827; /* Preto idêntico ao Figma e Segurança */
}

    .pref-toggle input:checked + .pref-slider-toggle:before {
        transform: translateX(20px);
    }

/* ── Responsivo ── */
@media (max-width: 600px) {
    .pref-container {
        padding: 24px 16px 48px;
    }

    .pref-card-header-inner,
    .pref-list-item {
        padding: 16px;
    }
}
