/* ===================================================
   RailCalcs — app.css
   Shared styles for all pages. Bootstrap 5.3 handles
   theming via data-bs-theme; these are extras only.
   =================================================== */

/* ---- Tool cards (home page) ---- */
.tool-card {
  transition: box-shadow .15s, transform .1s;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  box-shadow: 0 .35rem 1.25rem rgba(0, 0, 0, .15);
  transform: translateY(-1px);
}
.tool-card:focus-visible {
  outline: 3px solid var(--bs-primary);
  outline-offset: 2px;
}
.tool-card--soon {
  opacity: .52;
  cursor: default;
  pointer-events: none;
}
.tool-card--soon:hover {
  box-shadow: none;
  transform: none;
}
.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

/* ---- Calculator result fields ---- */
.result-field {
  background-color: var(--bs-secondary-bg) !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- Accordion — active panel header uses primary tint ---- */
.accordion-button:not(.collapsed) {
  background-color: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

/* ---- Status badge in results ---- */
.status-badge {
  font-size: .75rem;
  letter-spacing: .04em;
  font-weight: 700;
}

/* ---- Monospace numbers in results ---- */
.calc-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ---- Mobile: input-group labels go full-width above the field ---- */
@media (max-width: 575px) {
  .input-group {
    flex-wrap: wrap;
  }
  .input-group > .input-group-text:first-child {
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    width: 100%;
    border-bottom: 0;
  }
  .input-group > .form-control,
  .input-group > .form-select {
    border-radius: 0;
    border-top: 0;
  }
  .input-group > .input-group-text:last-child {
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
    border-top: 0;
    width: 100%;
    justify-content: center;
  }
}

/* ---- Slight body padding for breathing room ---- */
body {
  padding-bottom: 2rem;
}

/* ---- Footer always sits below content ---- */
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1 0 auto;
}
footer {
  flex-shrink: 0;
}

/* ---- Category section divider on home page ---- */
.category-heading {
  font-size: .7rem;
  letter-spacing: .1em;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---- Placeholder text in empty results panel ---- */
#calcPlaceholder {
  color: var(--bs-secondary-color);
  font-style: italic;
}

/* ---- Pass/fail inline badges on result rows ---- */
.pass-badge  { font-size: .65rem; vertical-align: middle; }
.fail-badge  { font-size: .65rem; vertical-align: middle; }
