/* Estilos específicos de la página Consumo */

.chart-placeholder {
  border-radius: 1rem;
  border: 1px dashed rgba(241, 196, 15, 0.25);
  background: rgba(241, 196, 15, 0.06);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  min-height: 220px;
  font-size: 0.9rem;
  position: relative;
}

.chart-placeholder.has-data {
  border-style: solid;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  place-items: stretch;
}

#consumptionChart {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 260px;
}

#chartEmptyState {
  margin: 0;
}

.chart-placeholder.has-data #chartEmptyState {
  display: none;
}

.metric-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.75rem;
  table-layout: fixed;
  min-width: 0;
}

.metric-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0 0.25rem 0.35rem;
  text-align: left;
}

.metric-table td {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  line-height: 1.35;
  color: inherit;
  word-break: break-word;
}

.metric-table td strong {
  font-weight: 600;
  color: #fff;
}

.metric-table-wrapper {
  width: 100%;
  overflow-x: hidden;
  padding-bottom: 0.25rem;
}

.simulator-form {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.simulator-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.simulator-actions .button-secondary {
  padding-inline: 1.5rem;
}

.simulator-result {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.4rem;
  padding: 1.35rem 1.5rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.simulator-result[hidden] {
  display: none !important;
}

.simulator-result .metric-table-wrapper {
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.5rem 0.7rem;
}

.simulator-summary {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.85rem;
  padding: 1.15rem 1.35rem;
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
}

.simulator-summary__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.15rem;
  font-size: 0.95rem;
}

.simulator-summary__line span {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.simulator-summary__line strong {
  font-weight: 700;
  color: #fff;
}

.simulator-summary__line--total {
  font-size: 1.05rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  margin-top: 0.35rem;
}

.simulator-summary__note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

#costSimulatorStatus {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-info {
  color: var(--accent);
}

.simulator-table th,
.simulator-table td {
  white-space: normal;
}

.simulator-table th {
  color: rgba(255, 255, 255, 0.7);
}

.simulator-table td small {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.simulator-table tbody tr {
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.simulator-table tbody tr:hover td {
  background: rgba(241, 196, 15, 0.12);
  box-shadow: 0 12px 26px rgba(241, 196, 15, 0.16);
}

@media (max-width: 480px) {
  .metric-table {
    min-width: 360px;
  }

  .metric-table th {
    font-size: 0.7rem;
  }

  .metric-table td {
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
  }

  .simulator-form {
    padding: 1rem 1.1rem;
  }

  .simulator-result {
    padding: 1.15rem 1.25rem;
  }

  .simulator-summary {
    padding: 0.95rem 1.1rem;
  }
}

@media (max-width: 720px) {
  .simulator-result {
    gap: 1.25rem;
  }

  .simulator-table thead {
    display: none;
  }

  .simulator-table,
  .simulator-table tbody,
  .simulator-table tr {
    display: block;
    width: 100%;
  }

  .simulator-table tbody tr {
    margin-bottom: 0.85rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.1rem;
  }

  .simulator-table td {
    display: grid;
    grid-template-columns: 0.65fr 1fr;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 0.75rem;
  }

  .simulator-table td:last-child {
    margin-bottom: 0;
  }

  .simulator-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
  }

  .simulator-table td strong {
    color: inherit;
  }

  .simulator-table td small {
    font-size: 0.72rem;
  }
}
