/* vents.css — IGEM/SR/25 Hazardous Zoning: Vents page */

/* Info card matches the look used on the stress-analysis tools */
.info-card {
  background: linear-gradient(135deg, #f8fdff 0%, #e8f4f8 100%);
}

/* Action card that launches the Define New Vent modal */
.vent-action-card {
  background: #ffffff;
}

/* ---- Results: Zone Distances table (bordered, blue values) ---- */
.zone-distance-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 360px;
}

.zone-distance-table th,
.zone-distance-table td {
  border: 1px solid #1f2933;
  padding: 0.35rem 1rem;
}

.zone-distance-table thead th {
  text-align: center;
  font-weight: 700;
  background: #eef4f7;
  color: #1f2933;
}

.zone-distance-table tbody th {
  text-align: left;
  font-weight: 700;
  color: #1f2933;
  white-space: nowrap;
}

.zone-distance-table tbody td {
  text-align: right;
  font-weight: 600;
  color: #0a58ca;          /* blue values, matching the reference */
}

.zone-distance-table sub {
  font-size: 0.7em;
}

/* ---- Results: Vent Data table ---- */
.vent-data-table th {
  font-weight: 500;
  color: var(--bs-primary);
  white-space: nowrap;
}

.vent-data-table td {
  text-align: right;
  font-weight: 600;
}

.vent-action-icon {
  font-size: 3rem;
  color: var(--bs-primary);
}

/* ---- Define New Vent modal ---- */
/* Width is driven dynamically by JS, which measures the visible tab bar and
   sizes the dialog to hug it (see syncModalWidth in vents.html). The value
   below is just the pre-measurement default for first paint. */
@media (min-width: 992px) {
  #defineVentModal .vent-dialog {
    max-width: 720px;
    transition: max-width 0.3s ease;
  }
}

#defineVentModal .modal-content {
  border: none;
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 1.5rem 3rem rgba(37, 92, 113, 0.25);
}

#defineVentModal .modal-header {
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
  border-bottom: none;
  padding: 1.1rem 1.5rem;
}

#defineVentModal .modal-title {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.2px;
}

#defineVentModal .modal-body {
  background: #f8fbfd;
  padding: 1.5rem;
}

/* ---- Tabs ---- */
#defineVentModal .nav-tabs {
  flex-wrap: nowrap;
  border-bottom: 2px solid var(--bs-info);
  gap: 0.25rem;
}

/* Scoped !important overrides the global navbar rule
   `.nav-link { color: white !important; }` in custom.css, which would
   otherwise render inactive tab text white-on-white. */
#defineVentModal .nav-tabs .nav-link {
  color: var(--bs-primary) !important;
  font-weight: 500;
  white-space: nowrap;
  border: none;
  border-radius: 0.6rem 0.6rem 0 0;
  padding: 0.6rem 1rem;
  margin-bottom: -2px;
  transition: all 0.18s ease;
}

#defineVentModal .nav-tabs .nav-link:hover {
  color: var(--bs-primary) !important;
  background-color: #e8f4f8;
}

#defineVentModal .nav-tabs .nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
  box-shadow: 0 0.25rem 0.5rem rgba(37, 92, 113, 0.2);
}

/* ---- Tab content panel ---- */
#defineVentModal .tab-content {
  background: #fff;
  border: 1px solid #e3eef2;
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  padding: 1.5rem;
  margin-top: 0;
  min-height: 280px;
  box-shadow: 0 0.25rem 0.75rem rgba(37, 92, 113, 0.05);
}

/* ---- Fieldsets (radio groups) ---- */
#defineVentModal fieldset {
  border: 1px solid #e3eef2;
  border-radius: 0.6rem;
  padding: 0.85rem 1.1rem 1.1rem;
  height: 100%;
  background: #f8fbfd;
}

#defineVentModal legend {
  float: none;
  width: auto;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bs-primary);
  padding: 0 0.5rem;
  margin-bottom: 0.6rem;
}

/* ---- Inputs ---- */
#defineVentModal .form-control,
#defineVentModal .form-select {
  border: 1px solid #cde1e8;
  border-radius: 0.5rem;
  padding: 0.38rem 0.7rem;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Tighter vertical rhythm between field rows */
#defineVentModal .tab-content .row {
  --bs-gutter-y: 0.65rem;
}

#defineVentModal .form-control:focus,
#defineVentModal .form-select:focus {
  border-color: var(--bs-secondary);
  box-shadow: 0 0 0 0.2rem rgba(63, 142, 159, 0.18);
}

/* ---- Labels (compact micro-labels) ---- */
/* Note: no uppercase transform — it would capitalise units like (barg)/(mm). */
#defineVentModal .form-label {
  font-weight: 600;
  color: var(--bs-secondary);
  margin-bottom: 0.15rem;
  font-size: 0.8rem;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

/* ---- Checkboxes / radios ---- */
#defineVentModal .form-check-input {
  cursor: pointer;
}

#defineVentModal .form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

#defineVentModal .form-check-input:focus {
  border-color: var(--bs-secondary);
  box-shadow: 0 0 0 0.2rem rgba(63, 142, 159, 0.18);
}

#defineVentModal .form-check-label {
  cursor: pointer;
}

/* Standalone toggle-style checkbox rows get a subtle card treatment */
#defineVentModal .check-card {
  background: #f8fbfd;
  border: 1px solid #e3eef2;
  border-radius: 0.6rem;
  padding: 0.7rem 1rem;
  transition: all 0.15s ease;
}

#defineVentModal .check-card:hover {
  border-color: var(--bs-info);
  background: #eef7fa;
}

/* ---- Footer ---- */
#defineVentModal .modal-footer {
  background: #f8fbfd;
  border-top: 1px solid #e3eef2;
}
