/* ja/calculators/rainfall-volume-runoff/styles.css */

.es004-grid {
  display: grid;
  gap: 16px;
}

.es004-span-2 {
  grid-column: 1 / -1;
}

.es004-row {
  display: grid;
  gap: 12px;
}

.es004-field {
  display: grid;
  gap: 6px;
}

.es004-field.is-required > span::after {
  content: "（必須）";
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
}

.es004-field.is-required input.input {
  background: rgba(254, 240, 138, 0.35);
  border-color: rgba(245, 158, 11, 0.5);
}

#es004-advanced.es004-advanced-required > summary::after {
  content: "（継続時間が必要）";
  margin-left: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #b45309;
}

.es004-inline-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.es004-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.es004-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.es004-tab {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-weight: 600;
}

.es004-tab.is-active {
  background: #0b57d0;
  color: #ffffff;
}

.es004-muted {
  color: #475569;
}

.es004-help-details {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

.es004-help-details > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: rgba(248, 250, 252, 0.9);
  color: #0b57d0;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.es004-help-details > summary::-webkit-details-marker {
  display: none;
}

.es004-help-pop {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.92);
  color: #334155;
}

.es004-error {
  color: #b91c1c;
  min-height: 1.2em;
}

.es004-warning {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: pre-line;
}

.es004-kpi {
  display: grid;
  gap: 6px;
}

.es004-kpi-main {
  font-size: 20px;
  font-weight: 800;
}

.es004-kpi-sub {
  color: #475569;
}

.es004-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.es004-table th,
.es004-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.es004-table th {
  width: 44%;
  text-align: left;
  color: #475569;
  font-weight: 600;
  background: #f8fafc;
}

.es004-table tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.7);
}

.es004-table tr:last-child th,
.es004-table tr:last-child td {
  border-bottom: none;
}

@media (min-width: 980px) {
  .es004-grid {
    grid-template-columns: minmax(340px, 460px) 1fr;
    align-items: start;
  }
}

@media (prefers-color-scheme: dark) {
  .es004-tab {
    color: rgba(226, 232, 240, 0.9);
  }

  .es004-field.is-required > span::after {
    color: #fbbf24;
  }

  .es004-field.is-required input.input {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.5);
  }

  #es004-advanced.es004-advanced-required > summary::after {
    color: #fbbf24;
  }

  .es004-tabs {
    background: rgba(148, 163, 184, 0.14);
  }

  .es004-muted {
    color: rgba(226, 232, 240, 0.8);
  }

  .es004-help-details > summary {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.5);
    color: rgba(147, 197, 253, 0.95);
  }

  .es004-help-pop {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: rgba(226, 232, 240, 0.9);
  }

  .es004-warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.1);
    color: #fde68a;
  }

  .es004-error {
    color: #fecaca;
  }

  .es004-kpi-sub {
    color: rgba(226, 232, 240, 0.8);
  }

  .es004-table {
    border-color: rgba(148, 163, 184, 0.25);
  }

  .es004-table th,
  .es004-table td {
    border-bottom-color: rgba(148, 163, 184, 0.25);
  }

  .es004-table th {
    color: rgba(226, 232, 240, 0.85);
    background: rgba(15, 23, 42, 0.6);
  }

  .es004-table tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.25);
  }
}
