/* ==========================================================
   Foto da Praia — páginas de previsão (/ondas e /tempo)
   Usa as variáveis de cor de site.css / tema.php.
   ========================================================== */

/* ---------- Topo colorido ---------- */

.prev-topo {
  position: relative;
  padding: 72px 24px 30px;
  border-radius: 0 0 var(--raio-cartao) var(--raio-cartao);
  color: #fff;
  text-align: center;
  background: linear-gradient(165deg, #0f3856 0%, #588c7f 55%, #6dc1d8 100%);
}
.prev-topo--ceu { background: linear-gradient(165deg, #2f7fc4 0%, #6fb2e2 60%, #b9dcef 100%); }
.prev-topo--noite { background: linear-gradient(165deg, #121d38 0%, #2a3f6c 60%, #586b93 100%); }

/* Imagem de fundo escolhida no painel (Ondas e tempo) + véu escuro para ler o texto */
.prev-topo--foto { overflow: hidden; }
.prev-topo__fundo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prev-topo__veu { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.5)); }
.prev-topo__local,
.prev-topo__titulo,
.prev-topo__destaque { position: relative; z-index: 1; }
.prev-topo--foto .prev-topo__titulo,
.prev-topo--foto .prev-topo__numero { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }

.prev-topo__voltar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  background: rgba(235, 232, 240, 0.72);
  color: #000;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.15s ease;
}
.prev-topo__voltar:hover { transform: scale(1.05); }

.prev-topo__local {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.prev-topo__titulo {
  margin: 2px 0 0;
  font-family: var(--fonte-titulo);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.3;
}

.prev-topo__destaque { margin-top: 18px; }
.prev-topo__destaque--tempo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: left;
}
.prev-topo__destaque--tempo .icone-tempo { color: #fff; flex-shrink: 0; }

.prev-topo__numero {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.prev-topo__numero small { font-size: 22px; font-weight: 600; letter-spacing: 0; }

.prev-topo__linha {
  margin: 6px 0 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: inherit;
  gap: 6px;
  flex-wrap: wrap;
}
.prev-topo__destaque:not(.prev-topo__destaque--tempo) .prev-topo__linha { justify-content: center; }
.prev-topo .estrelas { color: #ffd65a; }

/* ---------- Cartões ---------- */

.prev {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 16px 0;
}

.cartao {
  padding: 18px;
  border-radius: var(--raio-cartao);
  color: var(--cor-texto-botao);
  background: rgba(var(--cor-botao-rgb), 0.34);
  border: 1px solid rgba(var(--cor-botao-rgb), 0.55);
  box-shadow: 0 1px 2px rgba(var(--cor-sombra-rgb), 0.35), 0 0 8px rgba(0, 0, 0, 0.02);
}

.cartao__titulo {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.cartao--texto p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; }
.cartao--texto p:last-child { margin-bottom: 0; }

.prev-vazio p { margin: 0 0 6px; }

/* Grade de dados ("Agora") */
.dados {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 10px;
  margin: 0;
}
@media (max-width: 380px) {
  .dados { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dados__item { min-width: 0; }
.dados dt { font-size: 12px; opacity: 0.65; }
.dados dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.dados dd small { font-size: 12px; font-weight: 500; }
.dados .dados__nota { margin: 0; font-size: 12px; font-weight: 600; }

.seta { display: inline-block; vertical-align: -2px; }
.estrelas { display: inline-flex; gap: 1px; vertical-align: -2px; color: #d18f00; }

.vento { white-space: nowrap; }
.vento small { font-size: 0.85em; opacity: 0.75; }
.vento--terral { color: #1b7a48; }
.vento--lateral { color: #9a6400; }
.vento--maral { color: #b23a2b; }

/* ---------- Gráfico das ondas ---------- */

.grafico__area { position: relative; margin-top: 18px; }
.grafico { display: block; width: 100%; height: 130px; color: var(--cor-texto-botao); }
.grafico__escala {
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 11px;
  opacity: 0.6;
}
.grafico__dias {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-top: 4px;
  font-size: 12px;
  text-align: center;
  opacity: 0.75;
}

.legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.legenda li { display: flex; align-items: center; gap: 5px; }
.legenda__cor { width: 10px; height: 10px; border-radius: 3px; background: #b8b0a2; }
.legenda__cor--1 { background: #9ec5d8; }
.legenda__cor--2 { background: #5fa8c9; }
.legenda__cor--3 { background: #2b88b5; }
.legenda__cor--4 { background: #1c6a99; }
.legenda__cor--5 { background: #0e4b74; }

/* ---------- Dias (ondas) ---------- */

.dia { padding-top: 14px; padding-bottom: 14px; }
.dia__resumo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  cursor: pointer;
  list-style: none;
}
.dia__resumo::-webkit-details-marker { display: none; }
.dia__resumo::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.15s ease;
  opacity: 0.6;
}
.dia[open] .dia__resumo::after { transform: rotate(-135deg) translateY(-1px); }
.dia__nome { flex: 1; font-size: 16px; font-weight: 600; }
.dia__nome small { font-weight: 400; opacity: 0.6; }
.dia__faixa { font-size: 14px; font-weight: 500; }
.dia__melhor { margin: 10px 0 4px; font-size: 13px; }

.tabela-rolagem { overflow-x: auto; margin: 4px -4px 0; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabela th,
.tabela td { padding: 8px 4px; text-align: left; white-space: nowrap; }
.tabela__sub { margin-left: 2px; font-size: 12px; opacity: 0.6; }
.tabela .estrelas svg { width: 12px; height: 12px; }
.tabela thead th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.6; }
.tabela thead th small { text-transform: none; }
.tabela tbody tr { border-top: 1px solid rgba(0, 0, 0, 0.07); }
.tabela tbody th { font-weight: 600; }

/* ---------- Tempo: próximas horas ---------- */

.horas {
  display: flex;
  gap: 4px;
  margin: 0 -8px;
  padding: 0 0 6px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.horas__item {
  flex: 0 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border-radius: 16px;
  scroll-snap-align: start;
  font-size: 13px;
}
.horas__item:first-child { background: rgba(255, 255, 255, 0.45); font-weight: 600; }
.horas__temp { font-size: 16px; font-weight: 600; }
.horas__chuva { font-size: 11px; font-weight: 600; color: #2f73b5; }

/* ---------- Tempo: 7 dias ---------- */

.semana { margin: 0; padding: 0; list-style: none; }
.semana__dia {
  display: grid;
  grid-template-columns: 72px 32px 34px 28px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 4px 8px;
  padding: 10px 0;
}
.semana__dia + .semana__dia { border-top: 1px solid rgba(0, 0, 0, 0.07); }
.semana__nome { font-weight: 600; white-space: nowrap; }
.semana__nome small { display: block; font-weight: 400; font-size: 12px; line-height: 1.2; opacity: 0.6; }
.semana__chuva { font-size: 12px; font-weight: 600; color: #2f73b5; }
.semana__min { text-align: right; opacity: 0.7; }
.semana__max { font-weight: 600; }
.semana__barra { width: 100%; height: 6px; color: var(--cor-texto-botao); }
.semana__extra { grid-column: 1 / -1; font-size: 12px; opacity: 0.65; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icone-tempo { display: block; }

/* ---------- Rodapé ---------- */

.prev-rodape { text-align: center; }
.prev-rodape__aviso { max-width: 420px; margin: 0; font-size: 12px; opacity: 0.75; }
.prev-rodape__fonte { margin: 0; font-size: 12px; opacity: 0.65; }
.prev-rodape__fonte a { color: inherit; }
.prev-rodape__voltar {
  margin: 10px 0 6px;
  padding: 12px 24px;
  border-radius: 999px;
  color: var(--cor-texto-botao);
  background: rgba(var(--cor-botao-rgb), 0.34);
  border: 1px solid rgba(var(--cor-botao-rgb), 0.55);
  box-shadow: 0 1px 2px rgba(var(--cor-sombra-rgb), 0.35);
  font-weight: 500;
  text-decoration: none;
}
.prev-rodape__voltar:hover { box-shadow: 0 3px 10px rgba(var(--cor-sombra-rgb), 0.35); }
