/* Shared page frame for wakefrequencycalc.com, on top of the Reotemp Modern design system.
   reotemp-ds/tokens.css and reotemp-ds/bundle.css come from the design system unchanged;
   this file lays out the header, navigation, content column and footer every page shares. */

:root {
  --wf-max: 1040px;
  --wf-gutter: var(--space-6);
}

@media (max-width: 720px) {
  :root {
    --wf-gutter: var(--space-4);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

html {
  scroll-padding-top: var(--space-4);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

body > main {
  flex: 1;
}

/* Utility class for conditional content (toggled by script.js) */
.hidden {
  display: none !important;
}

/* Links in running text are Coolant. Zero specificity, so buttons, navigation and the
   footer keep the colors the system gives them. */
:where(a) {
  color: var(--blue-600);
}

:where(a:hover) {
  color: var(--blue-700);
}

/* Page frame: full-width bars whose content lines up with the centered column */
.wf-frame {
  padding-left: max(var(--wf-gutter), calc((100% - var(--wf-max)) / 2));
  padding-right: max(var(--wf-gutter), calc((100% - var(--wf-max)) / 2));
}

/* Header: logo, main navigation and the utility group, as the system's SiteHeader */
.rt-header.wf-frame {
  flex-wrap: wrap;
  row-gap: var(--space-3);
}

.wf-logo {
  display: block;
  line-height: 0;
}

.wf-logo img {
  width: 225px;
  height: auto;
  max-width: 100%;
}

.wf-nav .rt-nav {
  flex-wrap: wrap;
  row-gap: var(--space-2);
}

/* Under 900px the navigation moves to its own row below the logo */
@media (max-width: 900px) {
  .wf-nav {
    order: 3;
    flex-basis: 100%;
  }
}

/* Ghost button hover. The system's ".rt-btn:hover" gives every button a green-800 fill, and
   its ghost hover only changes the text to green-800, so a hovered ghost button (Reset, the
   video Close) showed green text on green. Keep the ghost white with no border on hover, as
   the system describes it: green text that darkens and underlines. */
.rt-btn-ghost:hover,
.rt-btn-ghost.is-hover {
  background: var(--white);
  border-color: transparent;
}

/* The system's ".rt h2" ink rule outranks .rt-section-green, so restate the green */
.rt .rt-section-green {
  color: var(--green-700);
}

/* Real subscripts (Noto Sans has no subscript s glyph) */
.rt sub {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: -0.25em;
}

.rt-pagetitle p {
  max-width: 720px;
}

/* Part numbers set in JetBrains Mono, as the system sets codes */
.wf-code {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wf-code::placeholder {
  text-transform: none;
}

/* Thermowell drawings (inlined by site.js) scale to their slot */
.wf-dwg {
  display: block;
  width: 100%;
  height: auto;
}

.wf-body {
  padding-top: var(--space-6);
  padding-bottom: var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.wf-lead {
  margin: 0;
  color: var(--gray-500);
}

/* Videos (site.js loads the player on click). The thumbnails carry their own labels at every
   edge, so the play control sits in a bar under the image: a solid green button and the
   running time, rather than an icon on a filled disc laid over the picture. */
.wf-video {
  display: block;
  overflow: hidden;
  border: var(--hairline) solid var(--grey-100);
  border-radius: var(--radius-lg);
  background: var(--white);
  text-decoration: none;
}

.wf-video img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}

.wf-video-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-top: var(--hairline) solid var(--grey-100);
}

.wf-video-play {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--green-700);
  color: var(--white);
  font: 600 13px/18px var(--font-sans);
}

.wf-video-play svg {
  width: 12px;
  height: 12px;
}

.wf-video:hover .wf-video-play {
  background: var(--green-800);
}

.wf-video-length {
  font-size: 13px;
  line-height: 18px;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}

.wf-video-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ink);
}

.wf-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* A video hint under a form field: a Coolant text link with a play icon */
.wf-video-hint {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 12px;
  line-height: 16px;
  color: var(--blue-600);
  text-decoration: none;
}

.wf-video-hint svg {
  flex: none;
  width: 12px;
  height: 12px;
}

.wf-video-hint:hover {
  color: var(--blue-700);
  text-decoration: underline;
}

.wf-video-dialog {
  width: min(880px, calc(100% - 2 * var(--space-4)));
  padding: var(--space-4);
  border: var(--hairline) solid var(--grey-100);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--gray-700);
}

.wf-video-dialog::backdrop {
  background: rgba(2, 43, 54, 0.6);
}

.wf-video-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.wf-video-dialog-note {
  margin: var(--space-3) 0 0;
}

/* Footer: phone and email sit under the brand paragraph so the columns hold only links */
.wf-footer-contact {
  margin: var(--space-3) 0 0;
}

@media (max-width: 720px) {
  .rt-pagetitle {
    padding-top: var(--space-5);
  }

  .rt-pagetitle h1 {
    font-size: 24px;
    line-height: 32px;
  }

  .rt-footer {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .rt-copyright {
    flex-direction: column;
    gap: var(--space-1);
  }
}

/* Saved-wells count next to "Batch" in the navigation (saved-wells.js) */
.wf-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: var(--space-1);
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--green-700);
  color: var(--white);
  font: 600 11px/1 var(--font-sans);
  vertical-align: 1px;
}
