/* =========================================
   ARQUIVO: consumidor/consumidor.css
   DATA: 20/02/2026
   PROJETO: Ranking Maranhão
   DESCRIÇÃO: Estilos da página de Atendimento ao Consumidor.
   ========================================= */

:root {
    --primary-blue: #003399;
    --primary-red: #cc0000;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --bg-light: #f4f6f9;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --border-color: #e5e7eb;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, sans-serif; }

body { 
    background-color: var(--bg-light); 
    color: var(--text-dark); 
    padding-top: 60px; /* Espaço do header */
    -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* =========================================
   1. LAYOUT PRINCIPAL
   ========================================= */
.consumidor-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 15px;
}

.page-header-consumidor {
    text-align: center;
    margin-bottom: 25px;
}

.page-header-consumidor h2 {
    font-size: 1.6rem;
    color: var(--primary-blue);
    font-weight: 800;
    margin-bottom: 8px;
}

.page-header-consumidor p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.4;
}

/* =========================================
   2. ALERTAS (WARNING E ERRO)
   ========================================= */
.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-banner i {
    font-size: 1.5rem;
    margin-top: 2px;
}

/* Alerta Laranja (Aviso para Parceiros) */
.warning-partner {
    background-color: #fffbeb;
    border-left: 4px solid var(--warning);
    color: #92400e;
}
.warning-partner i { color: var(--warning); }

.partner-link {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.2s;
}
.partner-link:hover { color: #002266; }

/* Alerta Vermelho (Cooldown/Bloqueio) */
.error-cooldown {
    background-color: #fef2f2;
    border-left: 4px solid var(--primary-red);
    color: #991b1b;
}
.error-cooldown i { color: var(--primary-red); }

/* =========================================
   3. CARD DO FORMULÁRIO E INPUTS
   ========================================= */
.consumidor-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 25px 20px;
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.input-group:last-of-type { margin-bottom: 0; }

.input-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.required { color: var(--primary-red); }

/* =========================================
   4. OPÇÕES DE RÁDIO (CARDS CLICÁVEIS)
   ========================================= */
.radio-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.radio-card input[type="radio"] {
    display: none; /* Oculta a bolinha padrão */
}

.radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 10px;
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 600;
    height: 100%;
}

.radio-content i {
    font-size: 1.5rem;
    color: #9ca3af;
    transition: color 0.2s;
}

.radio-content:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Estado Ativo/Selecionado */
.radio-card input[type="radio"]:checked + .radio-content {
    background: #eef2ff;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0, 51, 153, 0.1);
}

.radio-card input[type="radio"]:checked + .radio-content i {
    color: var(--primary-blue);
}

/* =========================================
   5. TEXTAREA E CONTADOR
   ========================================= */
.label-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
}
.char-counter.limit { color: var(--warning); font-weight: 700; }
.char-counter.error { color: var(--primary-red); font-weight: 700; }

textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-dark);
    resize: vertical;
    min-height: 100px;
    max-height: 250px;
    background: #fafafa;
    transition: border-color 0.2s;
    outline: none;
}

textarea:focus {
    border-color: var(--primary-blue);
    background: var(--white);
}

textarea.invalid {
    border-color: var(--primary-red);
}

.validation-msg {
    font-size: 0.8rem;
    color: var(--primary-red);
    font-weight: 600;
    min-height: 16px;
    display: block;
}

.hint-text {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: -5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================================
   6. BOTÃO DE ENVIO
   ========================================= */
.form-footer {
    margin-top: 30px;
}

.btn-primary-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0, 51, 153, 0.2);
    transition: background 0.2s, transform 0.1s;
}

.btn-primary-submit:hover:not(:disabled) {
    background: #002266;
}

.btn-primary-submit:active:not(:disabled) {
    transform: scale(0.98);
}

/* Estado de Processamento/Bloqueio */
.btn-primary-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

/* =========================================
   7. MODAL DE SUCESSO
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    animation: fadeInOverlay 0.2s;
}

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }

.modal-card-sucesso {
    background: var(--white);
    width: 90%; max-width: 380px;
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-pop);
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp { 
    from { transform: scale(0.8); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}

.icon-success {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 15px;
}

.modal-card-sucesso h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.modal-card-sucesso p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-primary-action {
    width: 100%;
    padding: 12px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary-action:hover { background: #002266; }

/* =========================================
   8. MODO NOTURNO (DARK THEME)
   ========================================= */
body.dark-theme { background-color: #121212; color: #e0e0e0; }
body.dark-theme .page-header-consumidor h2 { color: #90caf9; }
body.dark-theme .page-header-consumidor p { color: #aaa; }

/* Alertas no Dark Mode */
body.dark-theme .warning-partner { background: #452900; color: #fcd34d; border-color: #b45309; }
body.dark-theme .warning-partner i { color: #fcd34d; }
body.dark-theme .partner-link { color: #90caf9; }
body.dark-theme .partner-link:hover { color: #fff; }

body.dark-theme .error-cooldown { background: #3f1a1a; color: #fca5a5; border-color: #991b1b; }
body.dark-theme .error-cooldown i { color: #fca5a5; }

/* Card e Inputs no Dark Mode */
body.dark-theme .consumidor-card { background: #1e1e1e; border-color: #333; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
body.dark-theme .input-group label { color: #e0e0e0; }

body.dark-theme textarea { background: #252525; border-color: #444; color: #e0e0e0; }
body.dark-theme textarea:focus { border-color: #90caf9; background: #121212; }
body.dark-theme textarea.invalid { border-color: #ef4444; }

body.dark-theme .hint-text { color: #888; }
body.dark-theme .btn-primary-submit:disabled { background: #444; color: #888; }

/* Radio Cards no Dark Mode */
body.dark-theme .radio-content { background: #252525; border-color: #444; color: #aaa; }
body.dark-theme .radio-content:hover { background: #2d2d2d; border-color: #555; }
body.dark-theme .radio-card input[type="radio"]:checked + .radio-content { 
    background: #1a2a40; 
    border-color: #90caf9; 
    color: #90caf9; 
    box-shadow: none;
}
body.dark-theme .radio-card input[type="radio"]:checked + .radio-content i { color: #90caf9; }

/* Modal no Dark Mode */
body.dark-theme .modal-card-sucesso { background: #1e1e1e; border: 1px solid #333; }
body.dark-theme .modal-card-sucesso h3 { color: #fff; }
body.dark-theme .modal-card-sucesso p { color: #aaa; }