/* ja/calculators/earth-curvature-horizon/styles.css */

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

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

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

.es014-inline-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.es014-status {
  color: #334155;
}

.es014-status.is-ok {
  color: #166534;
}

.es014-status.is-error {
  color: #b91c1c;
}

.es014-muted {
  color: #475569;
}

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

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

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

.es014-panel {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.es014-panel[hidden] {
  display: none;
}

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

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

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

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

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

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

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

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

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

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

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

.es014-figure-wrap {
  display: grid;
  gap: 10px;
}

.es014-figure-host {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.es014-figure-svg {
  width: 100%;
  height: auto;
  max-height: 320px;
}

.es014-figure-bg {
  fill: rgba(148, 163, 184, 0.07);
}

.es014-figure-axis {
  stroke: rgba(51, 65, 85, 0.8);
  stroke-width: 1.4;
}

.es014-figure-grid {
  stroke: rgba(148, 163, 184, 0.3);
  stroke-width: 1;
}

.es014-figure-earth {
  fill: rgba(11, 87, 208, 0.09);
  stroke: #0b57d0;
  stroke-width: 2;
}

.es014-figure-line {
  fill: none;
  stroke: #0f172a;
  stroke-width: 2;
}

.es014-figure-line-secondary {
  fill: none;
  stroke: #d97706;
  stroke-width: 2;
  stroke-dasharray: 6 4;
}

.es014-figure-marker {
  fill: #b91c1c;
  stroke: #ffffff;
  stroke-width: 1.4;
}

.es014-figure-text {
  fill: rgba(15, 23, 42, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.es014-notes {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 720px) {
  .es014-inline-2,
  .es014-kpi-grid {
    grid-template-columns: 1fr;
  }
}

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

@media (prefers-color-scheme: dark) {
  .es014-status {
    color: rgba(226, 232, 240, 0.85);
  }

  .es014-status.is-ok {
    color: #86efac;
  }

  .es014-status.is-error {
    color: #fecaca;
  }

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

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

  .es014-tab {
    color: rgba(226, 232, 240, 0.92);
  }

  .es014-error {
    color: #fecaca;
  }

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

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

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

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

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

  .es014-table th {
    color: rgba(226, 232, 240, 0.92);
    background: rgba(15, 23, 42, 0.65);
  }

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

  .es014-figure-host {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.45);
  }

  .es014-figure-bg {
    fill: rgba(148, 163, 184, 0.08);
  }

  .es014-figure-axis {
    stroke: rgba(226, 232, 240, 0.85);
  }

  .es014-figure-grid {
    stroke: rgba(148, 163, 184, 0.25);
  }

  .es014-figure-earth {
    fill: rgba(96, 165, 250, 0.12);
    stroke: #60a5fa;
  }

  .es014-figure-line {
    stroke: rgba(226, 232, 240, 0.92);
  }

  .es014-figure-line-secondary {
    stroke: #fbbf24;
  }

  .es014-figure-marker {
    fill: #fca5a5;
    stroke: rgba(15, 23, 42, 0.9);
  }

  .es014-figure-text {
    fill: rgba(226, 232, 240, 0.94);
  }
}
