/* ============================================================
   Ribeirão Preto Conectada — styles.css
   Folha de estilos principal
   ============================================================ */

/* ── 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:   #002b5c;
    --orange-brand:   #e66400;
    --teal-bg:        #007c6f;
    --teal-dark:      #005a50;
    --btn-light-bg:   #d6efeb;
    --btn-light-text: #002b5c;
}

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

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

/* ── Container principal (moldura de "tablet") ───────────── */
#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.5);
    border-radius: 36px;
    border: 8px solid #1e293b;
}

@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;
    z-index: 1;
}

#app-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 124, 111, 0.88);
}

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

/* ── Caixa de vidro (glassmorphism) ──────────────────────── */
.glass-box {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    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.1);
    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(230, 100, 0, 0.4);
}
.btn-pill-orange:active { transform: scale(0.97); background-color: #cc5800; }

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

/* ── Botão fechar laranja ────────────────────────────────── */
.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.2);
    border: none;
    transition: background-color 0.2s;
}
.orange-close-btn:active { background-color: #cc5800; }

/* ── Botões de acessibilidade (círculo) ──────────────────── */
.acc-circle-btn {
    background-color: var(--primary-blue);
    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.2);
    transition: all 0.2s;
    border: none;
}
.acc-circle-btn:active { transform: scale(0.9); }
.acc-circle-btn.active {
    background-color: #0ea5e9;
    animation: pulse-ring 2s infinite;
}

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

/* ── Loader ──────────────────────────────────────────────── */
#page-loader {
    position: absolute;
    inset: 0;
    background-color: var(--teal-bg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

/* ── Overlay de tela (screens) ───────────────────────────── */
.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(0, 90, 80, 0.55);
    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.85);
    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.15);
    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(0, 43, 92, 0.6);
    backdrop-filter: blur(8px);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.custom-backdrop.active { opacity: 1; visibility: visible; }

/* ── Adesivos (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 Pontos Turísticos ──────────────────────────── */
.pontos-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.pontos-search-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    fill: rgba(0, 43, 92, 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.85);
    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.1);
}
.pontos-search-input::placeholder { color: rgba(0, 43, 92, 0.5); }
.pontos-search-clear {
    position: absolute;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 43, 92, 0.12);
    color: var(--primary-blue);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Abas Todos / Meus Favoritos ─────────────────────────── */
.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.25);
    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;
}
.pontos-tab.active .pontos-tab-badge { background-color: var(--orange-brand); color: white; }

/* ── Card de ponto turístico + botão de favoritar ────────── */
.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.25);
    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(230, 100, 0, 0.18);
}
.favorito-btn-card.is-favorito .favorito-heart-icon {
    fill: var(--orange-brand);
    stroke: var(--orange-brand);
}

/* ── Botão de favoritar na tela de detalhe ───────────────── */
.favorito-btn-detalhe {
    position: absolute;
    top: -4px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 43, 92, 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(230, 100, 0, 0.12); }
.favorito-btn-detalhe.is-favorito .favorito-heart-icon {
    fill: var(--orange-brand);
    stroke: var(--orange-brand);
}

/* ── Seletor de visões 360° (botões "1, 2, 3...") ────────── */
.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;
}


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 {
    color: #FFD700 !important;
}

body.high-contrast .bg-\[var\(--primary-blue\)\] {
    background-color: #000 !important;
    color: #FFD700 !important;
    border-bottom: 2px solid #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;
}

/* ── Alto Contraste: busca, favoritos e seletor 360 ──────── */
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;
}
