/* /var/www/html/jdserver/2026/modules/climate_pro_trends/climate_pro_trends.css
 * v6.12 — theme-safe (auto/claro/oscuro) + iOS/Safari select + color-scheme + focus
 */

#climate-pro-trends{
  max-width: 1120px;
  margin: 18px auto 64px;

  /* ayuda a controles nativos (iOS/Safari/Windows) */
  color-scheme: light dark;
}

.climatepro-trends{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-1);
  padding: 14px 18px 18px;

  /* base text: evita herencias raras en auto */
  color: var(--text, inherit);
  -webkit-text-fill-color: var(--text, currentColor);

  /* ayuda a controles nativos (iOS/Safari/Windows) */
  color-scheme: light dark;
}

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

.climatepro-trends-title{
  margin:0;
  font-size:1.05rem;
  font-weight:600;
  color: var(--text, inherit);
}

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

.climatepro-trends-range{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:.86rem;
}

.climatepro-trends-range label{
  color:var(--muted);
}

/* FIX iOS/Safari/Android: select visible y con texto correcto en auto/oscuro */
.climatepro-trends-range select{
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--card);
  font-size:.9rem;
  line-height: 1.2;

  color: var(--text, inherit);
  -webkit-text-fill-color: var(--text, currentColor);
  color-scheme: light dark;
  appearance: auto;

  outline: none;
}

.climatepro-trends-range select:focus-visible{
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent);
}

.climatepro-trends-range select option{
  background: var(--card);
  color: var(--text, inherit);
}

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

.climatepro-trends-chart-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin: 0 0 8px;
}

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

.climatepro-trends-note{
  font-size:.82rem;
  color:var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Chart container */
.climatepro-trends-chart-wrap canvas{
  width: 100%;
  max-height: 260px;
  display: block;
}

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

.climatepro-trends-loading{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: color-mix(in oklab, var(--card), var(--brand-50) 8%);
  color: var(--muted);
}

@media (max-width: 640px){
  #climate-pro-trends{ margin: 14px 0 40px; }
  .climatepro-trends{ padding: 14px 12px 18px; }
  .climatepro-trends-chart-wrap canvas{ max-height: 230px; }
  .climatepro-trends-note{ width:100%; text-align:right; }
}
