/* Helm Tools — styled to Helm Mechanical brand guidelines (helmgroup.com).
   Eina02 is the primary typeface; falls back to Helvetica per brand spec.
   Tool-pane content styling lives in ductsize.css / pipesize.css (unchanged). */

/* ══════════════════════════════════════════════════════════════
   1. Brand palette + Bootstrap CSS-variable overrides
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Helm brand palette */
  --helm-red:        #bf202f;
  --helm-red-dark:   #991928;
  --helm-black:      #080800;
  --helm-darkgray:   #3c3730;
  --helm-lightgray:  #71767a;

  /* Override Bootstrap primary → Helm Red */
  --bs-primary:                #bf202f;
  --bs-primary-rgb:            191, 32, 47;
  --bs-link-color:             #bf202f;
  --bs-link-hover-color:       #991928;
  --bs-focus-ring-color:       rgba(191, 32, 47, 0.25);

  /* Bootstrap nav-tab active state */
  --bs-nav-tabs-link-active-color:        #bf202f;
  --bs-nav-tabs-link-active-border-color: #bf202f #bf202f #ffffff;

  /* Typography — Eina02 primary, Helvetica fallback (both per brand spec) */
  --helm-font:           'Eina02', Helvetica, Arial, sans-serif;
  --bs-body-font-family: 'Eina02', Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--helm-font);
  color: var(--helm-black);
}

/* ══════════════════════════════════════════════════════════════
   2. Top navbar — Helm Red (approved: white icon + wordmark on red)
   ══════════════════════════════════════════════════════════════ */
.helm-navbar {
  background-color: var(--helm-red);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.helm-navbar .container-fluid {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Brand = hexagon chip + wordmark */
.helm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: #ffffff;
  font-family: var(--helm-font);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.helm-brand:hover,
.helm-brand:focus {
  color: #ffffff;
}

/* Hexagon logo chip — white, flat-top hex (brand signature shape).
   Brand rule: NO circles/ovals in place of hexagons. */
.helm-logo-hex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  /* flat-top hexagon */
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  flex-shrink: 0;
}
.helm-logo {
  width: 66%;
  height: 66%;
  object-fit: contain;
}

/* ══════════════════════════════════════════════════════════════
   3. Duct / Pipe pill switcher — frosted-white on red
   ══════════════════════════════════════════════════════════════ */
.helm-switch {
  display: inline-flex;
  margin-left: auto;
  padding: 4px;
  gap: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.helm-pill {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--helm-font);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.helm-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.helm-pill.active {
  background: #ffffff;
  color: var(--helm-red);
  font-weight: 700;
}
.helm-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════
   4. Tool sections
   ══════════════════════════════════════════════════════════════ */
.tool-section {
  padding-top: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════
   5. Nav tabs — Helm Red active indicator
   ══════════════════════════════════════════════════════════════ */
.nav-tabs .nav-link {
  color: var(--helm-darkgray);
  font-family: var(--helm-font);
  font-weight: 500;
}
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  color: var(--helm-red);
  border-color: transparent transparent rgba(191, 32, 47, 0.3);
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: var(--helm-red);
  font-weight: 600;
  border-top-width: 2px;
  border-color: var(--helm-red) var(--helm-red) #ffffff;
}

/* ══════════════════════════════════════════════════════════════
   6. Form controls — Helm Red focus ring + label typography
   ══════════════════════════════════════════════════════════════ */
.form-control:focus,
.form-select:focus {
  border-color: var(--helm-red);
  box-shadow: 0 0 0 0.2rem rgba(191, 32, 47, 0.18);
}
.form-label,
.table-footnote,
legend {
  font-family: var(--helm-font);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--helm-darkgray);
}

/* ══════════════════════════════════════════════════════════════
   7. Mobile radio button groups (btn-check)
   ══════════════════════════════════════════════════════════════ */
.opt-group-label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--helm-font);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--helm-darkgray);
}
.btn-option {
  border: 2px solid var(--helm-red) !important;
  color: var(--helm-red);
  padding: 0.45rem 0.9rem;
  font-family: var(--helm-font);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}
.btn-option:hover {
  background-color: rgba(191, 32, 47, 0.07);
  color: var(--helm-red);
}
.btn-check:checked + .btn-option {
  background-color: var(--helm-red);
  border-color: var(--helm-red) !important;
  color: #ffffff;
}
/* 3+ option groups wrap on narrow screens */
.btn-group.flex-wrap {
  flex-wrap: wrap;
  gap: 4px;
}

/* ══════════════════════════════════════════════════════════════
   8. Primary buttons (calculate / submit)
   ══════════════════════════════════════════════════════════════ */
.btn-primary {
  --bs-btn-bg:                 var(--helm-red);
  --bs-btn-border-color:       var(--helm-red);
  --bs-btn-hover-bg:           var(--helm-red-dark);
  --bs-btn-hover-border-color: var(--helm-red-dark);
  --bs-btn-active-bg:          var(--helm-red-dark);
  --bs-btn-active-border-color: var(--helm-red-dark);
  --bs-btn-focus-shadow-rgb:   191, 32, 47;
  font-family: var(--helm-font);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   9. Table headers — brand typography
   ══════════════════════════════════════════════════════════════ */
.table thead th {
  font-family: var(--helm-font);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--helm-darkgray);
}

/* ══════════════════════════════════════════════════════════════
  10. Responsive — small screens
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
  .helm-switch {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}
