/* FitoNova site -- hand-written, no build step, no external requests.
   The two things a reader can do from any page without scrolling (owner,
   2026-10-14): reach us -- the phone and the e-mail beside the brand -- and
   order for a company, through the same form the pricing band carries, opened
   over the page by js/order.js.

   The last of the ordered sheets in public/css/: it leans on header.css (the
   row, the pill) and pricing.css (the form), and overrides parts of both, so
   it has to come after them. Owner's ruling 2026-08-10: no source file over
   500 lines. */

/* -------------------------------------------------------- header contact */
/* Two short lines stacked in the height of the row, behind the same --line2
   hairline the page links use to set themselves apart. The phone line comes
   first: a farm calls before it writes. */
.hdr-contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 36px;
  gap: 4px;
  padding-left: 20px;
  border-left: 1px solid var(--line2);
}

.hc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 13px/1.15 "Barlow", sans-serif;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.hc-link:hover {
  color: var(--acc);
}

.hc-ic {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: var(--acc);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

/* ------------------------------------------------------ the order button */
/* Outlined, beside the solid download button rather than a second solid one:
   two filled blocks side by side read as one control. */
.btn-line {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font: 600 14px/1 "Barlow", sans-serif;
  padding: 10px 17px;
  border: 1px solid var(--acc);
  color: var(--acc);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* "Pagina principală" broke onto two lines at 901px and pushed the header to
   79px, past the --hdrh the hero subtracts. A control's label never wraps. */
.hdr-tools .btn-solid {
  white-space: nowrap;
}

/* The worded theme toggle measured 34px beside 36px buttons. */
.theme-slot button {
  min-height: 36px;
}

/* The pill keeps scrolling but drops the bar, which painted across the
   active link's underline; core.js marks the side that has more, and that
   edge fades. Keywords, not tokens: a mask reads alpha only. */
.dock-in {
  scrollbar-width: none;
}

.dock-in::-webkit-scrollbar {
  display: none;
}

.dock-in.more-after {
  -webkit-mask-image: linear-gradient(90deg, black calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, black calc(100% - 36px), transparent);
}

.dock-in.more-before {
  -webkit-mask-image: linear-gradient(90deg, transparent, black 36px);
  mask-image: linear-gradient(90deg, transparent, black 36px);
}

.dock-in.more-before.more-after {
  -webkit-mask-image: linear-gradient(90deg, transparent, black 36px, black calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, transparent, black 36px, black calc(100% - 36px), transparent);
}

/* Its short word takes over under 1100px, where the full label no longer
   fits beside "Descărcați"; the aria-label keeps the full name either way. */
.ho-short {
  display: none;
}

.btn-line:hover {
  background: var(--fill);
  border-color: var(--fill);
  color: var(--onacc);
}

/* Its phone-width twin rides in the pill, outside the scroller, so no amount
   of sideways scrolling can carry it off the screen. The two queries are exact
   complements, like the page links': one of the two shows at every width.
   `.dock a` in header.css is a display rule of its own, so this one has to
   match its specificity or the button shows on every desktop. */
.dock a.dock-order {
  display: none;
}

/* --------------------------------------------------------- order dialog */
/* The top layer already sits above the sticky header and the pill; the page
   behind it stops scrolling so a flick inside the form cannot move it. The
   lock is on body, not html: html keeping its own overflow is what lets
   body's propagate to the viewport, and a viewport that stops being the
   scroller unsticks the header behind the backdrop. --sbw is the classic
   scrollbar the lock takes away (js/order.js measures it; 0 for overlay
   bars), handed back as padding so the page does not widen under the
   backdrop. */
html.has-dialog body {
  overflow: hidden;
  padding-right: var(--sbw, 0px);
}

.order-dialog {
  margin: auto;
  padding: 0;
  width: min(720px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.order-dialog[open] {
  display: flex;
  flex-direction: column;
}

/* A literal: ::backdrop does not inherit custom properties in every browser
   the site supports, and a var() that fails there paints nothing at all. */
.order-dialog::backdrop {
  background: rgba(4, 12, 18, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.od-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 14px 28px;
  border-bottom: 1px solid var(--line);
}

.od-title {
  margin: 0;
  font: 600 28px/1.05 "Barlow Condensed", sans-serif;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.od-close {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--mut);
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.od-close:hover {
  border-color: var(--acc);
  color: var(--acc);
}

/* The cross is two hairlines drawn by the stylesheet, so the script that
   builds the dialog needs no SVG of its own. */
.od-close::before,
.od-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.6px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.od-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.od-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 28px 28px;
}

/* The form arrives with the card's own framing; inside the dialog the title
   bar is the frame, so the rule, the air above it and the kicker go. */
.order-dialog .firms-order {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.order-dialog .price-kicker {
  display: none;
}

.order-dialog .of-grid {
  margin-top: 0;
}

/* While a secondary page fetches the form: a square turning in the middle of
   the body, the blueprint's own shape, and aria-busy on the body says why. */
.od-body.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.od-body.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid var(--line2);
  border-top-color: var(--acc);
}

/* The form's place in the pricing card while it is up in the dialog: held
   open at the height it had, so nothing below it moves under the backdrop. */
.of-slot {
  min-height: var(--slot-h, 0px);
}

@keyframes od-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes od-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes od-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .order-dialog[open] {
    animation: od-in 0.34s cubic-bezier(0.16, 0.68, 0.24, 1);
  }

  .order-dialog[open]::backdrop {
    animation: od-fade 0.3s ease;
  }

  .od-body.is-loading::before {
    animation: od-spin 0.9s linear infinite;
  }
}

/* ------------------------------------------------------ price in the form */
/* The total is what the reader came to the form to learn, so it is the one
   large figure; the package and the arithmetic sit quietly above it. */
/* --raise, not --paper: --mut on --paper reads 4.49:1 in the light theme, a
   hair under the 4.5 small text owes. */
.of-price {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line2);
  background: var(--raise);
}

.op-row {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font: 400 14px/1.4 "Barlow", sans-serif;
  color: var(--mut);
}

.op-unit {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.op-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  align-items: center;
  font-weight: 500;
  color: var(--ink);
}

.op-label {
  min-width: 0;
}

.op-sum {
  font: 600 28px/1 "Barlow Condensed", sans-serif;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.op-vat {
  font: 400 15px/1 "Barlow", sans-serif;
  color: var(--mut);
}

/* Held open while empty, so the total does not jump when a count arrives. */
.op-calc {
  display: block;
  min-height: 1.4em;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
}

/* No valid count: a quiet dash, not a bold one that reads as a minus. */
.of-price.is-empty .op-amount {
  font-weight: 400;
  color: var(--mut);
}

/* The pill's links sit inside a 44px scroller that clips overflow on both
   axes, so a ring drawn outside them loses its top and bottom. Inset, for
   every link in the pill alike. */
.dock a:focus-visible {
  outline-offset: -4px;
}

.op-note {
  margin: 0;
  font: 400 13px/1.45 "Barlow", sans-serif;
  color: var(--mut);
}

/* ------------------------------------------------------------ responsive */
/* Under 1100 the stacked lines no longer fit beside the brand and the tools;
   the two links become icon buttons, named by their aria-label, the same size
   as the theme toggle beside them. */
@media (max-width: 1100px) {
  .hdr-contact {
    flex-direction: row;
    gap: 6px;
    padding-left: 14px;
  }

  .hc-text {
    display: none;
  }

  .hc-link {
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line2);
  }

  .hc-link:hover {
    border-color: var(--acc);
  }

  .hc-ic {
    width: 18px;
    height: 18px;
  }

  /* The theme toggle drops its word here rather than at 560 (header.css),
     and squares up with the icons beside it: at 901px the RO secondary pages
     needed those 40px for "Comandă pentru firme" and "Pagina principală". */
  .theme-slot .theme-label {
    display: none;
  }

  .theme-slot button {
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .ho-long {
    display: none;
  }

  .ho-short {
    display: inline;
  }
}

/* The order button stays beside the download button for as long as that one
   is in the header (owner, 2026-10-14: "a comanda legyen a descarcati
   mellett"); only from 768 down, where the download leaves, does it move to
   the pill. */
@media (max-width: 768px) {
  .hdr-order {
    display: none;
  }

  .dock {
    display: flex;
  }

  .dock-in {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Outlined like its header twin: on a phone the app download is still
     the first thing the page asks for, and a solid block here outweighed it. */
  .dock a.dock-order {
    display: inline-flex;
    flex: none;
    padding: 0 16px;
    color: var(--acc);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--acc);
    border-bottom-color: transparent;
  }

  .dock a.dock-order:hover {
    background: var(--fill);
    box-shadow: inset 0 0 0 1px var(--fill);
    color: var(--onacc);
  }
}

/* A touch tablet between 769 and 1100 keeps the desktop row but not its
   36px targets: every header control grows to 44px and the row gives back
   the difference in padding, so the header stays exactly --hdrh (65). */
@media (pointer: coarse) and (min-width: 769px) and (max-width: 1100px) {
  .hdr-row {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hc-link,
  .theme-slot button {
    width: 44px;
    height: 44px;
  }

  .langs > * {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .btn-line {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hdr-tools .btn-solid {
    padding-top: 15px;
    padding-bottom: 15px;
  }
}

/* A touch screen from here down: every contact target grows to 44px, which
   is also the height that keeps the header at its --hdrh of 73. */
@media (max-width: 768px) {
  .hc-link {
    width: 44px;
    height: 44px;
  }

  .theme-slot button {
    width: 44px;
    height: 44px;
  }

  /* Every touch width gets the full sheet: from here down the form is one
     column and a card with margins still scrolled its own submit away. */
  .order-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
  }

  .od-head {
    padding: 8px 8px 8px 20px;
  }

  .od-title {
    font-size: 24px;
  }

  .od-body {
    padding: 18px 20px 28px;
  }
}

@media (max-width: 560px) {
  /* 4px between the language code and the theme toggle read as one control;
     the 4 it gains comes out of the row's two gaps, so 360px still fits. */
  .hdr-row {
    gap: 10px;
  }

  .hdr-tools {
    gap: 8px;
  }

  .hdr-contact {
    gap: 2px;
    padding-left: 0;
    border-left: 0;
  }

  .hc-link {
    width: 42px;
    border-color: transparent;
  }

  .op-sum {
    font-size: 24px;
  }
}

/* The narrowest phones keep the call, which is the one a farm reaches for;
   the address is still in the order form and in the footer. */
@media (max-width: 359px) {
  .hc-mail {
    display: none;
  }
}

@media print {
  .hdr-order,
  .order-dialog {
    display: none;
  }
}
