/*
 * Header 2026 do portal (pages2023/_includes/header-2026.php)
 *
 * Estilo copiado do header da SpotWay (Tailwind convertido para CSS puro), com a cor do
 * Guia Taubaté. Tudo fica dentro de .gt-header para não vazar para o resto do site, que
 * continua em Bootstrap 4 + layout.css.
 *
 * Medidas em px: o layout.css do Guia fixa html{font-size:15px}, e rem encolheria tudo
 * em relação à SpotWay (base 16px).
 *
 * Breakpoints iguais aos da SpotWay (Tailwind): sm 640, lg 1024, xl 1280.
 */

.gt-header {
    /* cor da marca: azul do Guia (a SpotWay usa o roxo dela aqui) */
    --gt-marca: #14608e;
    --gt-marca-hover: #0f4c70;
    --gt-marca-foco: #1f7fb8;
    --gt-marca-anel: rgba(20, 96, 142, .12);

    /* neutros no mesmo esquema da SpotWay, puxados para o tom do azul */
    --gt-fundo: #ffffff;
    --gt-texto: #0a0a0a;
    --gt-texto-suave: #64707a;
    --gt-borda: #e1e5e8;
    --gt-destaque: #eef3f7;
    --gt-sombra-suave: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .06);

    --gt-raio: 100px;
    --gt-fonte: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    background: var(--gt-fundo);
    color: var(--gt-texto);
    font-family: var(--gt-fonte);
    font-size: 14px;
    line-height: 1.5;
    padding-top: 0; /* layout.css dá padding-top: 8px em header */
    -webkit-font-smoothing: antialiased;
}

.gt-header *,
.gt-header *::before,
.gt-header *::after {
    box-sizing: border-box;
}

.gt-header a,
.gt-header a:hover,
.gt-header a:focus {
    text-decoration: none;
}

.gt-header svg {
    display: block;
    flex-shrink: 0;
}

.gt-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* A largura vem do .container do Bootstrap + layout.css (mesma classe no HTML), para o
   header alinhar com o conteúdo da página em qualquer largura. */
.gt-container {
    position: relative;
}

/* ---- topo fixo -------------------------------------------------------- */

.gt-topo {
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid var(--gt-borda);
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.gt-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
}

.gt-icone-circulo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gt-borda);
    border-radius: 50%;
    color: var(--gt-texto);
    transition: color .15s, border-color .15s, background-color .15s;
}

.gt-icone-circulo svg {
    width: 20px;
    height: 20px;
}

.gt-icone-circulo-sm {
    width: 36px;
    height: 36px;
}

.gt-icone-circulo-sm svg {
    width: 16px;
    height: 16px;
}

.gt-menu {
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.gt-menu:hover .gt-icone-circulo {
    background: var(--gt-destaque);
}

.gt-logo {
    flex-shrink: 0;
    display: block;
}

.gt-logo img {
    display: block;
    width: 157px;
    height: auto;
}

/* ---- localização + tempo (xl) ---------------------------------------- */

.gt-local {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

.gt-local > svg {
    width: 20px;
    height: 20px;
    color: var(--gt-marca);
}

.gt-local-texto {
    font-size: 14px;
    line-height: 1.25;
}

.gt-local-texto strong {
    display: block;
    font-weight: 700;
}

.gt-tempo {
    display: inline-flex;
    align-items: center;
    gap: 4.8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gt-texto-suave);
}

.gt-tempo img {
    width: 18px;
    height: auto;
}

.gt-tempo-max {
    color: #d94352;
}

.gt-tempo-min {
    color: var(--gt-marca);
}

/* ---- busca ------------------------------------------------------------ */

.gt-busca-desktop {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 8px;
}

.gt-busca-mobile {
    padding-bottom: 12px;
}

.gt-busca {
    position: relative;
    width: 100%;
    margin: 0;
}

.gt-busca-campo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 16px;
    border: 1px solid var(--gt-borda);
    border-radius: var(--gt-raio);
    background: var(--gt-fundo);
    transition: border-color .15s, box-shadow .15s;
}

.gt-busca-campo:focus-within {
    border-color: var(--gt-marca-foco);
    box-shadow: 0 0 0 4px var(--gt-marca-anel);
}

.gt-busca-lupa {
    color: var(--gt-texto-suave);
}

.gt-busca-lupa svg {
    width: 16px;
    height: 16px;
}

.gt-header .gt-busca-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 32px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    color: var(--gt-texto);
}

.gt-header .gt-busca-input::placeholder {
    color: var(--gt-texto-suave);
    opacity: 1;
}

.gt-header .gt-busca-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.gt-header .gt-busca-canal {
    display: none; /* aparece a partir de sm */
    flex-shrink: 0;
    height: 32px;
    max-width: 176px;
    field-sizing: content; /* só a largura da opção escolhida (Chrome/Edge) */
    padding: 0 24px 0 12px;
    border: 0;
    border-left: 1px solid var(--gt-borda);
    border-radius: 0;
    outline: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364707a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 4px center / 16px;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--gt-texto-suave);
    cursor: pointer;
}

.gt-busca-botao {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--gt-raio);
    background: var(--gt-marca);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background-color .15s;
}

.gt-busca-botao:hover {
    background: var(--gt-marca-hover);
}

.gt-busca-botao svg {
    width: 16px;
    height: 16px;
}

.gt-busca-botao-texto {
    display: none;
}

/* ---- ações ------------------------------------------------------------ */

.gt-acoes {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.gt-entrar {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gt-texto-suave);
    transition: color .15s;
}

.gt-entrar:hover {
    color: var(--gt-texto);
}

.gt-anuncie {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--gt-raio);
    background: var(--gt-marca);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    transition: background-color .15s;
}

.gt-header .gt-anuncie:hover,
.gt-header .gt-anuncie:focus {
    background: var(--gt-marca-hover);
    color: #fff;
}

.gt-anuncie svg {
    width: 20px;
    height: 20px;
}

.gt-anuncie-extra {
    display: none;
}

/* ---- barra de categorias --------------------------------------------- */

.gt-categorias {
    border-bottom: 1px solid var(--gt-borda);
    background: var(--gt-fundo);
}

.gt-categorias-interno {
    position: relative;
    padding-top: 4px;
    padding-bottom: 4px;
}

.gt-cat-lista {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.gt-cat-lista::-webkit-scrollbar {
    display: none;
}

.gt-cat-lista.gt-arrastando {
    cursor: grabbing;
}

.gt-cat-link {
    display: inline-flex;
    align-items: center;
    gap: 6.4px;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--gt-raio);
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--gt-texto-suave);
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, background-color .15s;
}

.gt-header .gt-cat-link:hover,
.gt-header .gt-cat-link:focus-visible {
    background: var(--gt-destaque);
    color: var(--gt-marca);
}

.gt-header .gt-cat-principal {
    font-weight: 600;
    color: var(--gt-texto);
}

.gt-cat-primeiro {
    padding-left: 0;
}

.gt-cat-divisor {
    flex-shrink: 0;
    width: 1px;
    height: 20px;
    margin: 0 4px;
    background: var(--gt-borda);
}

.gt-cat-mais svg {
    width: 16px;
    height: 16px;
}

.gt-cat-seta {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--gt-borda);
    border-radius: 50%;
    background: var(--gt-fundo);
    color: var(--gt-texto-suave);
    box-shadow: var(--gt-sombra-suave);
    transform: translateY(-50%);
    cursor: pointer;
    transition: color .15s;
}

.gt-cat-seta[hidden] {
    display: none;
}

.gt-cat-seta:hover {
    color: var(--gt-marca);
}

.gt-cat-seta svg {
    width: 20px;
    height: 20px;
}

.gt-cat-seta-anterior {
    left: 15px;
}

.gt-cat-seta-proxima {
    right: 15px;
}

/* ---- responsivo ------------------------------------------------------- */

@media (min-width: 640px) {
    .gt-acoes {
        gap: 12px;
    }

    .gt-header .gt-busca-canal {
        display: block;
    }

    .gt-busca-botao-texto {
        display: inline;
    }
}

@media (min-width: 1024px) {
    .gt-busca-desktop {
        display: block;
    }

    .gt-busca-mobile {
        display: none;
    }

    .gt-acoes {
        margin-left: 0;
    }

    .gt-entrar {
        display: inline-flex;
    }

    .gt-anuncie {
        padding: 0 16px;
    }

    .gt-anuncie-extra {
        display: inline;
    }
}

@media (min-width: 1280px) {
    .gt-local {
        display: flex;
    }
}

/* previsão do tempo no lugar da cidade */
.gt-local-tempo {
    gap: 6px;
}

.gt-local .gt-tempo-icone {
    width: 28px;
    height: auto;
}

.gt-local-texto strong.gt-tempo-max {
    font-size: 15px;
    line-height: 1.1;
    color: var(--gt-texto);
}

.gt-local-tempo .gt-tempo {
    gap: 0;
}

/* visitante logado: "Olá, Nome" com menu (Minha conta / Sair), no lugar do "Entrar".
   <details> abre e fecha sem JavaScript. (25/09) */
.gt-header .gt-conta {
    position: relative;
}

.gt-header .gt-conta summary {
    list-style: none;
    cursor: pointer;
}

.gt-header .gt-conta summary::-webkit-details-marker {
    display: none;
}

.gt-header .gt-conta-inicial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gt-marca);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.gt-header .gt-conta-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    padding: 6px;
    border: 1px solid var(--gt-borda);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px -12px rgba(16, 32, 48, .28);
}

.gt-header .gt-conta-menu a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gt-texto-suave);
}

.gt-header .gt-conta-menu a:hover {
    background: #f5f7f9;
    color: var(--gt-marca);
}
