/* ja/calculators/slope-grade/styles.css */

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

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

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

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

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

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

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

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

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

.es005-muted {
  color: #475569;
}

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

.es005-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;
}

.es005-kpi {
  display: grid;
  gap: 10px;
}

.es005-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.es005-kpi-item {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(248, 250, 252, 0.7);
}

.es005-kpi-label {
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}

.es005-kpi-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 900;
}

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

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

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

.es005-table.es005-table-3col th {
  width: auto;
}

.es005-table.es005-table-3col th,
.es005-table.es005-table-3col td {
  text-align: center;
}

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

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

.es005-diagram {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.es005-diagram-svg {
  max-width: 100%;
  height: auto;
  color: #0f172a;
}

.es005-diagram-line {
  stroke: rgba(51, 65, 85, 0.55);
  stroke-width: 2.2;
}

.es005-diagram-hyp {
  stroke: rgba(11, 87, 208, 0.9);
  stroke-width: 3;
}

.es005-diagram-right-angle {
  stroke: rgba(51, 65, 85, 0.55);
  stroke-width: 2;
  fill: none;
}

.es005-diagram-text {
  font-size: 12px;
  fill: rgba(15, 23, 42, 0.9);
}

.es005-diagram-angle {
  font-size: 12px;
  font-weight: 800;
  fill: rgba(11, 87, 208, 0.95);
}

.es005-diagram-trend {
  font-size: 12px;
  font-weight: 900;
  fill: rgba(15, 23, 42, 0.85);
}

.es005-diagram-arrow {
  stroke: rgba(15, 23, 42, 0.65);
  stroke-width: 2.2;
  fill: none;
}

.es005-inv-box {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 12px;
  background: rgba(248, 250, 252, 0.6);
}

.es005-inv-result {
  font-weight: 800;
}

@media (max-width: 520px) {
  .es005-kpi-grid {
    grid-template-columns: 1fr;
  }
}

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

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

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

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

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

  .es005-error {
    color: #fecaca;
  }

  .es005-kpi-item {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.55);
  }

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

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

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

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

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

  .es005-diagram-svg {
    color: rgba(226, 232, 240, 0.95);
  }

  .es005-diagram-text,
  .es005-diagram-trend {
    fill: rgba(226, 232, 240, 0.92);
  }

  .es005-diagram-line,
  .es005-diagram-right-angle,
  .es005-diagram-arrow {
    stroke: rgba(226, 232, 240, 0.55);
  }

  .es005-diagram-hyp {
    stroke: rgba(147, 197, 253, 0.95);
  }

  .es005-diagram-angle {
    fill: rgba(147, 197, 253, 0.95);
  }

  .es005-inv-box {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.5);
  }
}
