/* JDServer-Webs v6.7 — climate_pro_monthly.css
 * Resumen mensual + climograma — tabla compacta Apple-ish
 */

/* Contenedor de la sección: mismo ancho que el módulo anual */
#climate-pro-monthly{
  margin: 18px 0 64px;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

/* Card principal del módulo */
.climatepro-monthly{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-1);
  padding: 14px 18px 16px; /* igual que header/annual */
  margin-top: 0;           /* el espacio lo da el section */
}

.climatepro-monthly-head{
  margin-bottom: 10px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}

.climatepro-monthly-title{
  margin: 0;
  font-size: 1.05rem; /* similar al h3 del resumen anual */
  font-weight:600;
}

.climatepro-monthly-sub{
  margin: 3px 0 0;
  font-size: .88rem;
  color: var(--muted);
}

.climatepro-monthly-empty{
  margin: 8px 0 0;
  font-size: .9rem;
  color: var(--muted);
}

/* Selector de año */
.climatepro-monthly-year{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:.86rem;
}

.climatepro-monthly-year label{
  color:var(--muted);
}

.climatepro-monthly-year select{
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--card);
  font-size:.9rem;
}

/* Tabla */

.climatepro-monthly-table-wrap{
  margin-top: 10px;
  overflow-x: auto;
}

.climatepro-monthly-table{
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 520px;
}

.climatepro-monthly-table thead th{
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.climatepro-monthly-table tbody td{
  padding: 6px 8px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  vertical-align: middle;
}

/* Nombre del mes + badges */

.climatepro-month-name{
  font-weight: 500;
}

.climatepro-badges{
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
}

.climatepro-badge{
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated, var(--card));
  color: var(--muted);
}

/* Mes más cálido */
.climatepro-badge.warmest{
  border-color: color-mix(in oklab, var(--brand) 45%, transparent);
}

/* Mes más lluvioso */
.climatepro-badge.rainiest{
  border-color: color-mix(in oklab, var(--brand) 45%, transparent);
}

/* Resaltar filas especiales ligeramente */

.climatepro-monthly-table tbody tr.is-warmest{
  background: color-mix(in oklab, var(--brand) 6%, transparent);
}

.climatepro-monthly-table tbody tr.is-rainiest{
  background: color-mix(in oklab, var(--brand) 10%, transparent);
}

.climatepro-monthly-table tbody tr.is-warmest.is-rainiest{
  background: color-mix(in oklab, var(--brand) 14%, transparent);
}

/* ---- Climograma (gráfico) ------------------------------------ */

.climatepro-monthly-chart-wrap{
  margin-top: 18px;
}

.climatepro-monthly-chart-title{
  margin: 0 0 8px;
  font-size: .9rem;
  color: var(--muted);
}

.climatepro-monthly-chart-wrap canvas{
  width: 100%;
  max-height: 260px;
}

/* Responsive */

@media (max-width: 640px){
  #climate-pro-monthly{
    margin: 14px 0 40px;
  }

  .climatepro-monthly{
    padding-inline: 12px;
  }

  .climatepro-monthly-table{
    min-width: 100%;
    font-size: .84rem;
  }

  .climatepro-monthly-table thead th{
    white-space: normal;     /* deja que se partan en 2 líneas */
    line-height: 1.15;
    padding: 4px 6px;
    font-size: .78rem;
  }

  .climatepro-monthly-table tbody td{
    padding: 4px 6px;
    font-size: .82rem;
  }

  .climatepro-monthly-chart-wrap{
    margin-top: 14px;
  }

  .climatepro-monthly-chart-wrap canvas{
    max-height: 230px;
  }
}
