/* Forecast Inventario · La Gaviota
   Consumes the gv-* design system (gaviota_ui.css) and adds only the
   components unique to this page: info chip, provider-settings panel,
   mobile cards and the table footnote.
*/

/* ---------- Info chip ---------- */
.fcst-info-chip {
  background: var(--gv-navy-050);
  border: 1px solid var(--gv-slate-200);
  border-left: 3px solid var(--gv-navy-600);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--gv-slate-700);
  line-height: 1.55;
}
.fcst-info-chip svg { flex-shrink: 0; color: var(--gv-navy-700); }
.fcst-info-chip strong { color: var(--gv-ink); font-weight: 600; }

/* ---------- Provider settings panel ---------- */
.fcst-panel { margin-top: 12px; }
.fcst-panel summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--gv-slate-200);
  border-radius: 6px;
  transition: background 0.15s ease;
}
.fcst-panel summary:hover { background: var(--gv-slate-050); }
.fcst-panel[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.fcst-panel summary::-webkit-details-marker { display: none; }
.fcst-panel__title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--gv-font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--gv-ink);
}
.fcst-panel__count {
  font-family: var(--gv-font-mono);
  font-size: 11px;
  color: var(--gv-slate-500);
  background: var(--gv-slate-100);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.fcst-panel__chev {
  color: var(--gv-slate-400);
  transition: transform 0.2s ease;
}
.fcst-panel[open] .fcst-panel__chev { transform: rotate(180deg); }

.fcst-panel__body {
  background: #ffffff;
  border: 1px solid var(--gv-slate-200);
  border-top: 0;
  border-radius: 0 0 6px 6px;
}
.fcst-panel__head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.4fr) auto;
  gap: 14px;
  padding: 8px 16px;
  background: var(--gv-slate-050);
  border-bottom: 1px solid var(--gv-slate-200);
  font-family: var(--gv-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gv-slate-500);
}
.fcst-panel__head span:nth-child(1) { text-align: left; }
.fcst-panel__head span:nth-child(2),
.fcst-panel__head span:nth-child(3) { text-align: left; }
.fcst-panel__head span:nth-child(4) { text-align: right; }

.fcst-prov-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.4fr) auto;
  gap: 14px;
  padding: 10px 16px;
  align-items: center;
  border-bottom: 1px solid var(--gv-slate-100);
}
.fcst-prov-row:last-child { border-bottom: 0; }
.fcst-prov-row:hover { background: var(--gv-slate-050); }

.fcst-prov-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gv-ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fcst-prov-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Reduced to the sizing gv-input/gv-select don't cover; borders, focus
   ring, font and color all come from gv-input gv-input--sm gv-input--mono. */
.fcst-num-input {
  width: 64px;
  text-align: right;
}

.fcst-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--gv-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.fcst-tag--default {
  color: var(--gv-slate-500);
  background: var(--gv-slate-100);
  text-transform: uppercase;
}
.fcst-tag--override {
  color: var(--gv-amber-dark);
  background: var(--gv-warn-050);
  border: 1px solid var(--gv-warn-100);
  text-decoration: line-through;
  text-decoration-color: var(--gv-amber);
}

.fcst-prov-action { text-align: right; }

/* ---------- Mobile: stack the row vertically ---------- */
@media (max-width: 720px) {
  .fcst-panel__head { display: none; }
  .fcst-prov-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px;
  }
  .fcst-prov-input::before {
    content: attr(data-label);
  }
  .fcst-prov-action { text-align: left; }
}

/* ---------- Table footnote (renamed from sd-footnote to avoid clashing
   with sales_dashboard.css, which owns that class) ---------- */
.fcst-footnote {
  font-family: var(--gv-font-sans);
  font-size: 11px;
  color: var(--gv-slate-500);
  font-style: italic;
  padding: 10px 18px;
  background: var(--gv-slate-050);
  border-top: 1px dashed var(--gv-slate-200);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.fcst-footnote__icon {
  background: var(--gv-warn-050);
  color: var(--gv-amber-dark);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.fcst-footnote__icon svg { width: 14px; height: 14px; }

/* ---------- Inline minimum form (compact) ---------- */
.fcst-min-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

/* ---------- Mobile cards ---------- */
.fcst-mcard {
  background: #ffffff;
  border: 1px solid var(--gv-slate-200);
  border-radius: 6px;
  padding: 12px;
}
.fcst-mcard__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gv-ink);
  margin-bottom: 2px;
}
.fcst-mcard__meta {
  font-family: var(--gv-font-mono);
  font-size: 10.5px;
  color: var(--gv-slate-500);
  letter-spacing: 0.02em;
}
.fcst-mcard__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.fcst-mcard__cell {
  background: var(--gv-slate-050);
  border: 1px solid var(--gv-slate-100);
  border-radius: 4px;
  padding: 6px 8px;
}
.fcst-mcard__cell--span2 { grid-column: span 2; }
.fcst-mcard__lbl {
  font-family: var(--gv-font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gv-slate-500);
}
.fcst-mcard__val {
  font-family: var(--gv-font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--gv-ink);
  margin-top: 1px;
}

/* ---------- Colores semánticos de la tabla ---------- */
/* Más específico que `.gv-table td { color: var(--gv-ink) }`, que vive en la misma capa. */
.gv-table td.fcst-reorder-point { color: var(--gv-navy-700); }
.gv-table td.fcst-reorder-qty { color: var(--gv-ok-700); }

.fcst-footnote strong { color: var(--gv-slate-700); }
