/* ============================================================
   Campanha Política — site.css
   Adaptado de RP Conectada para uso em campanha eleitoral
   ============================================================ */

/* ── Fonte local ─────────────────────────────────────────── */
@font-face {
    font-family: 'Kathen';
    src: url('../assets/fonts/KathenFont.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* ── Variáveis de design ─────────────────────────────────── */
:root {
    --primary-blue:   #1a3a6b;   /* azul da campanha */
    --orange-brand:   #e8a000;   /* amarelo/dourado de destaque */
    --teal-bg:        #1a3a6b;   /* fundo principal (azul) */
    --teal-dark:      #0f2447;   /* azul mais escuro */
    --btn-light-bg:   #dde8f5;   /* botão claro */
    --btn-light-text: #1a3a6b;
    --red-campaign:   #c0392b;   /* vermelho partido (customizável) */
    --green-campaign: #27ae60;   /* verde partido (customizável) */
}

/* ── Reset / base ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #0d1b35;
    margin: 0;
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Container principal ─────────────────────────────────── */
#app-container {
    width: 100%;
    max-width: 560px;
    height: 100dvh;
    max-height: 920px;
    position: relative;
    background-color: var(--teal-bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 36px;
    border: 8px solid #0f2447;
}

@media (max-height: 920px), (max-width: 560px) {
    #app-container {
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }
}

/* ── Fundo dinâmico ──────────────────────────────────────── */
#app-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    z-index: 1;
}

#app-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 58, 107, 0.82) 0%,
        rgba(15, 36, 71, 0.92) 100%
    );
}

/* ── Tipografia de impacto ───────────────────────────────── */
.title-impact {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    font-weight: 700;
    line-height: 1.1;
}

/* ── Número do candidato ─────────────────────────────────── */
.numero-candidato {
    font-family: 'Oswald', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: var(--orange-brand);
    text-shadow: 0 4px 20px rgba(232, 160, 0, 0.5);
    line-height: 1;
    letter-spacing: -2px;
}

/* ── Foto do candidato (círculo com borda dourada) ───────── */
.candidato-foto {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--orange-brand);
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(232, 160, 0, 0.4);
    flex-shrink: 0;
}

/* ── Caixa de vidro (glassmorphism) ──────────────────────── */
.glass-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
}

/* ── Botões pill ─────────────────────────────────────────── */
.btn-pill-light,
.btn-pill-orange,
.btn-pill-dark {
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 9999px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-pill-light {
    background-color: var(--btn-light-bg);
    color: var(--btn-light-text);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: relative;
}
.btn-pill-light:active { transform: scale(0.97); background-color: #ffffff; }

.btn-pill-orange {
    background-color: var(--orange-brand);
    color: white;
    box-shadow: 0 4px 15px rgba(232, 160, 0, 0.5);
}
.btn-pill-orange:active { transform: scale(0.97); background-color: #c48700; }

.btn-pill-dark {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.btn-pill-dark:active { transform: scale(0.97); }

/* ── Botão fechar ────────────────────────────────────────── */
.orange-close-btn {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--orange-brand);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    z-index: 100;
    cursor: pointer;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    border: none;
    transition: background-color 0.2s;
}
.orange-close-btn:active { background-color: #c48700; }

/* ── Botões de acessibilidade (círculo) ──────────────────── */
.acc-circle-btn {
    background-color: rgba(255,255,255,0.15);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.25);
}
.acc-circle-btn:active { transform: scale(0.9); }
.acc-circle-btn.active {
    background-color: var(--orange-brand);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(232, 160, 0, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(232, 160, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 160, 0, 0); }
}

/* ── Loader ──────────────────────────────────────────────── */
#page-loader {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a3a6b, #0f2447);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

/* ── Overlay de tela ─────────────────────────────────────── */
.screen-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    background-color: rgba(15, 36, 71, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.screen-overlay.active { opacity: 1; visibility: visible; }
.screen-overlay.immersive-dark {
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Cápsula de logotipo no rodapé ───────────────────────── */
.bottom-logo-capsule {
    background-color: white;
    padding: 8px 18px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 54px;
    z-index: 40;
}

/* ── TTS: leitura em voz alta ────────────────────────────── */
.reading-now {
    background-color: rgba(255, 255, 255, 0.7) !important;
    color: var(--orange-brand) !important;
    border-radius: 4px;
    outline: 3px dashed rgba(255, 255, 255, 0.6);
    outline-offset: 3px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

body.tts-active .paragraph-tts { cursor: pointer !important; }
body.tts-active .paragraph-tts:hover {
    outline: 2px dashed rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ── Modal base ──────────────────────────────────────────── */
.custom-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 380px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.custom-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.custom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 50, 0.7);
    backdrop-filter: blur(8px);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.custom-backdrop.active { opacity: 1; visibility: visible; }

/* ── Stickers ────────────────────────────────────────────── */
.sticker-captured {
    position: absolute;
    cursor: move;
    user-select: none;
}

/* ── Idioma ativo ────────────────────────────────────────── */
.lang-active {
    border-color: var(--orange-brand) !important;
    color: var(--orange-brand) !important;
    font-weight: 900 !important;
    background-color: #fff !important;
    opacity: 1 !important;
}

/* ── Busca de Propostas / Compromissos ───────────────────── */
.pontos-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.pontos-search-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    fill: rgba(26, 58, 107, 0.55);
    pointer-events: none;
}
.pontos-search-input {
    width: 100%;
    padding: 0.7rem 2.4rem 0.7rem 2.4rem;
    border-radius: 9999px;
    border: none;
    background-color: rgba(255, 255, 255, 0.88);
    color: var(--primary-blue);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pontos-search-input::placeholder { color: rgba(26, 58, 107, 0.5); }
.pontos-search-clear {
    position: absolute;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background-color: rgba(26, 58, 107, 0.12);
    color: var(--primary-blue);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Abas ────────────────────────────────────────────────── */
.pontos-tabs {
    display: flex;
    gap: 0.5rem;
}
.pontos-tab {
    flex: 1;
    border: none;
    border-radius: 9999px;
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background-color 0.2s, color 0.2s;
}
.pontos-tab.active {
    background-color: white;
    color: var(--primary-blue);
}
.pontos-tab-badge {
    background-color: var(--orange-brand);
    color: white;
    border-radius: 9999px;
    font-size: 0.65rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Card de proposta / compromisso ──────────────────────── */
.ponto-card-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.ponto-card-btn { flex: 1; }

.favorito-btn-card {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}
.favorito-btn-card:active { transform: scale(0.9); }
.favorito-btn-card .favorito-heart-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    stroke-width: 2;
    transition: fill 0.2s, stroke 0.2s;
}
.favorito-btn-card.is-favorito { background-color: rgba(232, 160, 0, 0.2); }
.favorito-btn-card.is-favorito .favorito-heart-icon {
    fill: var(--orange-brand);
    stroke: var(--orange-brand);
}

/* ── Botão de favoritar (detalhe) ────────────────────────── */
.favorito-btn-detalhe {
    position: absolute;
    top: -4px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: rgba(26, 58, 107, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}
.favorito-btn-detalhe:active { transform: scale(0.9); }
.favorito-btn-detalhe .favorito-heart-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 2;
    transition: fill 0.2s, stroke 0.2s;
}
.favorito-btn-detalhe.is-favorito { background-color: rgba(232, 160, 0, 0.12); }
.favorito-btn-detalhe.is-favorito .favorito-heart-icon {
    fill: var(--orange-brand);
    stroke: var(--orange-brand);
}

/* ── Botões do seletor 360 ───────────────────────────────── */
.tour360-select-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}
.tour360-select-btn:active { transform: scale(0.92); }
.tour360-select-btn.active {
    background-color: var(--orange-brand);
    border-color: white;
}

/* ── Banner de urna na selfie ────────────────────────────── */
.selfie-urna-banner {
    position: absolute;
    bottom: 0;
    inset-x: 0;
    height: 140px;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
}
.selfie-urna-banner::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 300px;
    background-color: var(--orange-brand);
    top: 15px;
    left: -10%;
    transform: rotate(7deg);
    transform-origin: top left;
}
.selfie-urna-banner::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 300px;
    background-color: var(--primary-blue);
    top: 21px;
    left: -10%;
    transform: rotate(7deg);
    transform-origin: top left;
}

/* ── Pill de partido / cargo ─────────────────────────────── */
.cargo-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--orange-brand);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 9999px;
}

/* ── Ícone de tema da proposta ───────────────────────────── */
.proposta-tema-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background-color: var(--orange-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

/* ────────────────────────────────────────────────────────────
   ALTO CONTRASTE
   ────────────────────────────────────────────────────────────*/
body.high-contrast { filter: none !important; background-color: #000 !important; }
body.high-contrast #app-container {
    background-color: #000 !important;
    border-color: #FFD700 !important;
}
body.high-contrast #app-background { display: none !important; }
body.high-contrast .glass-box,
body.high-contrast .bg-white,
body.high-contrast .screen-overlay,
body.high-contrast .custom-modal {
    background: #000 !important;
    background-color: #000 !important;
    border: 2px solid #FFD700 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.high-contrast *, body.high-contrast p, body.high-contrast div,
body.high-contrast span, body.high-contrast li {
    color: #FFF !important; text-shadow: none !important;
}
body.high-contrast h1, body.high-contrast h2, body.high-contrast h3,
body.high-contrast .title-impact, body.high-contrast strong,
body.high-contrast .numero-candidato {
    color: #FFD700 !important;
}
body.high-contrast .btn-pill-light,
body.high-contrast .btn-pill-orange,
body.high-contrast .btn-pill-dark {
    background-color: #000 !important;
    color: #FFD700 !important;
    border: 2px solid #FFD700 !important;
    box-shadow: none !important;
}
body.high-contrast .btn-pill-light:active,
body.high-contrast .btn-pill-orange:active,
body.high-contrast .btn-pill-dark:active {
    background-color: #FFD700 !important;
    color: #000 !important;
}
body.high-contrast img, body.high-contrast video, body.high-contrast canvas {
    filter: grayscale(100%) contrast(150%) !important;
}
body.high-contrast .acc-circle-btn, body.high-contrast .orange-close-btn {
    background-color: #000 !important;
    color: #FFD700 !important;
    border: 2px solid #FFD700 !important;
    box-shadow: none !important;
}
body.high-contrast .orange-close-btn:active {
    background-color: #FFD700 !important; color: #000 !important;
}
body.high-contrast .bottom-logo-capsule {
    background-color: #000 !important;
    border: 2px solid #FFD700 !important;
    border-bottom: none !important;
    box-shadow: none !important;
}
body.high-contrast .reading-now {
    background-color: rgba(255, 215, 0, 0.2) !important;
    color: #FFD700 !important;
    outline: 3px dashed #FFD700 !important;
}
body.high-contrast svg { fill: #FFD700 !important; color: #FFD700 !important; }
body.high-contrast .lang-active {
    border-color: #FFD700 !important;
    background-color: #FFD700 !important;
    color: #000 !important;
    font-weight: bold !important;
}
body.high-contrast .pontos-search-input {
    background-color: #000 !important; color: #FFD700 !important;
    border: 2px solid #FFD700 !important;
}
body.high-contrast .pontos-search-input::placeholder { color: rgba(255, 215, 0, 0.6) !important; }
body.high-contrast .pontos-search-icon { fill: #FFD700 !important; }
body.high-contrast .pontos-search-clear {
    background-color: #000 !important; color: #FFD700 !important;
    border: 1px solid #FFD700 !important;
}
body.high-contrast .pontos-tab {
    background-color: #000 !important; color: #FFD700 !important;
    border: 2px solid #FFD700 !important;
}
body.high-contrast .pontos-tab.active {
    background-color: #FFD700 !important; color: #000 !important;
}
body.high-contrast .pontos-tab-badge {
    background-color: #FFD700 !important; color: #000 !important;
}
body.high-contrast .favorito-btn-card,
body.high-contrast .favorito-btn-detalhe {
    background-color: #000 !important; border: 2px solid #FFD700 !important;
}
body.high-contrast .favorito-btn-card .favorito-heart-icon,
body.high-contrast .favorito-btn-detalhe .favorito-heart-icon {
    stroke: #FFD700 !important; fill: none !important;
}
body.high-contrast .favorito-btn-card.is-favorito .favorito-heart-icon,
body.high-contrast .favorito-btn-detalhe.is-favorito .favorito-heart-icon {
    fill: #FFD700 !important; stroke: #FFD700 !important;
}
body.high-contrast .tour360-select-btn {
    background-color: #000 !important;
    border: 2px solid #FFD700 !important; color: #FFD700 !important;
}
body.high-contrast .tour360-select-btn.active {
    background-color: #FFD700 !important; color: #000 !important;
}
body.high-contrast .cargo-pill {
    background-color: #000 !important; border: 2px solid #FFD700 !important;
    color: #FFD700 !important;
}
body.high-contrast .proposta-tema-icon {
    background-color: #000 !important; border: 2px solid #FFD700 !important;
}
