#clima-popup {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 340px;
  padding: 20px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(180deg, #4799b2, #0a1c31);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

#clima-popup.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

span#clima-fechar {
  margin-left: 40%;
}

span#clima-fechar:hover {
  cursor: pointer;
}

p#clima-desc {
  text-transform: capitalize;
  margin-top: -1rem;
}

/* alerta */
#clima-alerta {
  background: #ffb703;
  color: #000;
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: none;
  font-size: 12px;
}

/* atual alinhado */
.clima-atual {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clima-temp-box {
  display: flex;
  flex-direction: column;
}

/* coluna */
.clima-extra {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  margin-bottom: 20px;
}

.dia-prev {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#clima-botao {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #4799b2;
  padding: 17px 17px;
  border-radius: 200px;
  color: #fff;
  cursor: pointer;
  z-index: 9999;
  border: 2px solid #fff;
}
#clima-botao:hover {
  background: #1e3e48;
}

/* ================================================================
   PÁGINA /meteorologia  — estilos adicionados na v10.0
   ================================================================ */

.clima-page-wrap {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 16px 60px;
  font-family: inherit;
  color: #fff;
}

/* Card principal */
.cp-card {
  border-radius: 24px;
  padding: 32px 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 24px;
}

.cp-card h1 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 20px;
  opacity: 0.8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Atual */
.cp-atual {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

#cp-icon {
  width: 80px;
  height: 80px;
}

.cp-temp-box {
  display: flex;
  flex-direction: column;
}

#cp-temp {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

#cp-desc {
  font-size: 1rem;
  text-transform: capitalize;
  opacity: 0.85;
  margin: 6px 0 0;
}

/* Alerta */
#cp-alerta {
  background: #ffb703;
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 18px;
  display: none;
  font-size: 13px;
  font-weight: 600;
}

/* Extra info grid */
.cp-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  font-size: 14px;
  margin-bottom: 4px;
}

.cp-extra-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-extra-item span:first-child {
  opacity: 0.65;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cp-extra-item span:last-child {
  font-weight: 700;
  font-size: 16px;
}

/* Atualizado */
#cp-atualizado {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 18px;
  text-align: right;
}

p#fonte {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 23px;
  text-align: right;
}

/* Previsão */
.cp-previsao-titulo {
  color: #4799b2;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  font-weight: 700;
}

#cp-forecast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.cp-dia-card {
  background: linear-gradient(160deg, #4799b2, #0a1c31);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cp-dia-nome {
  font-size: 12px;
  text-transform: capitalize;
  opacity: 0.8;
  font-weight: 500;
}

.cp-dia-icon {
  width: 52px;
  height: 52px;
}

.cp-dia-temps {
  display: flex;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.cp-max {
  color: #ffb703;
}
.cp-min {
  opacity: 0.7;
}

/* Loading / erro */
#cp-loading {
  text-align: center;
  padding: 60px 20px;
  color: #4799b2;
  font-size: 1rem;
}
#cp-erro {
  text-align: center;
  padding: 40px 20px;
  color: #ff6b6b;
  display: none;
}
#cp-content {
  display: none;
}

/* Responsivo */
@media (max-width: 480px) {
  #cp-temp {
    font-size: 2.8rem;
  }
  .cp-extra {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .cp-card {
    padding: 24px 18px 18px;
  }
  #cp-forecast {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================================================================
   BACKGROUNDS DINÂMICOS POR CONDIÇÃO CLIMÁTICA — adicionado v10.13
   Aplicados em .cp-card (card atual) e .cp-dia-card (previsão).
   Todas as classes usam gradientes CSS puro, sem imagens externas.
   ================================================================ */

/* Fallback / padrão */
.cp-bg-default {
  background: linear-gradient(160deg, #4799b2, #0a1c31) !important;
}

/* ☀️ Céu limpo — dia */
.cp-bg-sunny {
  background: linear-gradient(160deg, #f9d423, #f97316, #c2410c) !important;
}

/* 🌙 Céu limpo — noite */
.cp-bg-clear-night {
  background: linear-gradient(160deg, #1a1a4e, #0f0c29, #302b63) !important;
}

/* 🌤️ Poucas nuvens — dia */
.cp-bg-partly-cloudy {
  background: linear-gradient(160deg, #74b9e8, #3a8cc4, #1e5f90) !important;
}

/* 🌤️ Poucas nuvens — noite */
.cp-bg-partly-cloudy-night {
  background: linear-gradient(160deg, #2c3e6b, #1a2a4a, #0d1b35) !important;
}

/* 🌥️ Nuvens dispersas */
.cp-bg-cloudy {
  background: linear-gradient(160deg, #8fa8c0, #5d7a94, #3b566e) !important;
}

/* ☁️ Muito nublado / encoberto */
.cp-bg-overcast {
  background: linear-gradient(160deg, #6b7f8f, #4a5e6d, #2d3f4f) !important;
}

/* 🌦️ Garoa / chuva leve */
.cp-bg-drizzle {
  background: linear-gradient(160deg, #6a9fb5, #3d7a96, #1e4f66) !important;
}

/* 🌧️ Chuva */
.cp-bg-rain {
  background: linear-gradient(160deg, #4a6fa5, #2c4f7c, #162d4e) !important;
}

/* ⛈️ Tempestade */
.cp-bg-storm {
  background: linear-gradient(160deg, #2c2c54, #1a1a3e, #474787) !important;
}

/* ❄️ Neve */
.cp-bg-snow {
  background: linear-gradient(160deg, #c9d6e3, #a8bfd4, #6e9ab5) !important;
}

/* 🌫️ Neblina / névoa / fumaça */
.cp-bg-fog {
  background: linear-gradient(160deg, #9aabb8, #6e8494, #4a6272) !important;
}
