/* Umbrella Energía (S37) · tables, reference-value forms, budget ring and the hover tooltip. */
/* Tables: scroll inside their own box on phones. */
.en-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.en-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.en-table th {
  padding: 6px 8px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hud-muted);
  border-bottom: 1px solid var(--hud-border);
  white-space: nowrap;
}
.en-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--hud-border);
  white-space: nowrap;
}
.en-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.en-table tr[data-unit]:hover td {
  background: var(--surface-sunk);
}

/* Forms (reference values). */
.en-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}
.en-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hud-muted);
}
.en-form label span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.en-form input {
  width: 100%;
  min-width: 0;
  min-height: 40px; /* comfortable touch target */
  padding: 8px 10px;
  border: 1px solid var(--hud-border);
  border-radius: 8px;
  background: #fff;
  color: var(--hud-text);
  font: inherit;
  font-size: 14px;
}
.en-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.en-form small {
  white-space: nowrap;
}

/* Budget ring. */
.en-budget {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-2);
  align-items: center;
}
.en-budget dl,
.en-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
}
.en-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--sp-1);
}
.en-budget dt,
.en-stats dt {
  font-size: 11px;
  color: var(--hud-muted);
}
.en-budget dd,
.en-stats dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.en-budget.is-over .kit-ring .fill {
  stroke: var(--bad);
}
.en-budget .is-bad {
  color: var(--bad);
}

/* Tooltip (fixed, follows the pointer, clamped to the viewport). */
.en-tip {
  position: fixed;
  z-index: 40;
  display: grid;
  gap: 4px;
  min-width: 190px;
  max-width: min(300px, calc(100vw - 16px));
  padding: 10px 12px;
  border-radius: 10px;
  background: #1b1c20;
  color: #f3f4f6;
  font-size: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  pointer-events: none;
}
.en-tip[hidden] {
  display: none;
}
.en-tip span {
  display: flex;
  gap: 8px;
  align-items: center;
}
.en-tip span b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.en-tip i {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--c);
}
@media (max-width: 600px) {
  .en-budget {
    grid-template-columns: 1fr;
  }
  .en-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
