/* =========================================================
   LATA SCIENTIFIC — enquiry system
   Styles for <enquiry-form>, <whatsapp-button> and <product-cta>.
   Built on the tokens in styles.css so the premium industrial look
   carries straight through — nothing here redefines the palette.
   ========================================================= */

/* ---------------------------------------------------------
   Product action stack  (<product-cta>)
   Order is deliberate: quotation first, technical data second,
   datasheet last — visitors check dimensions before downloading.
   --------------------------------------------------------- */
product-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}
product-cta .btn { max-width: 100%; }
/* Wrap long button labels instead of pushing them past the container. */
product-cta .btn { white-space: normal; text-align: left; }

.pd__more-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-strong);
}
.pd__more-link svg { flex: none; transition: transform .3s var(--ease); }
.pd__more-link:hover svg { transform: translateX(3px); }

@media (max-width: 560px) {
  product-cta { align-items: stretch; }
  product-cta .btn { width: 100%; justify-content: center; text-align: center; }
  .pd__more-link { justify-content: center; }
}

/* ---------------------------------------------------------
   WhatsApp button variant (used inside forms)
   --------------------------------------------------------- */
.btn--wa {
  background: #25D366;
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(37,211,102,0.6);
}
.btn--wa:hover:not(:disabled) {
  background: #1FBE5B;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -14px rgba(37,211,102,0.7);
}
.btn--wa svg { width: 20px; height: 20px; }
/* The WhatsApp glyph is an icon, not a directional arrow — hold it still. */
.btn--wa:hover svg { transform: none; }

/* ---------------------------------------------------------
   Enquiry form
   --------------------------------------------------------- */
enquiry-form { display: block; }

.enq {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}

.enq__head {
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.enq__eyebrow {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 8px;
}
.enq__product {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.enq__dot {
  width: 9px; height: 9px; flex: none;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.enq__note {
  margin-top: 8px;
  font-size: 0.94rem;
  color: var(--muted);
}

.field__opt { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }

/* styles.css clears the outline on :focus and leaves a 9%-opacity ring —
   readable with a mouse, but thin for keyboard use. Keyboard focus gets a
   solid outline back; pointer focus keeps the quiet ring. */
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.enq .field__err {
  font-size: 0.86rem;
  color: #D93A3F;
  min-height: 0;
}
.enq .field.is-invalid .field__err { margin-top: 2px; }

.enq__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.enq__actions .btn { flex: 1 1 220px; }

.enq__btn { position: relative; }
.enq__btn:disabled { opacity: .72; cursor: progress; transform: none; }

/* Loading spinner — takes the place of the label while submitting. */
.enq__spin {
  display: none;
  width: 17px; height: 17px; flex: none;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: enqSpin .7s linear infinite;
}
.enq__btn.is-loading .enq__spin { display: inline-block; }
.enq__btn.is-loading svg { display: none; }
.enq__btn.is-loading .enq__btn-label { opacity: .8; }
@keyframes enqSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .enq__spin { animation-duration: 1.8s; }
}

.enq__status {
  margin-top: 14px;
  font-size: 0.94rem;
  color: var(--body);
  min-height: 1.4em;
}
.enq__fine {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.enq__fine a { color: var(--accent-strong); font-weight: 500; }
.enq__fine a:hover { text-decoration: underline; }

.enq.is-busy { pointer-events: none; }
.enq.is-busy .enq__actions { pointer-events: auto; }

@media (max-width: 560px) {
  .enq__actions .btn { flex: 1 1 100%; }
}

/* ---------------------------------------------------------
   Success dialog
   --------------------------------------------------------- */
.enq-modal {
  position: fixed;
  inset: 0;
  z-index: 200;               /* above .wa-float (95) and .to-top (90) */
  display: grid;
  place-items: center;
  padding: 20px;
}
.enq-modal[hidden] { display: none; }

/* The entry motion is an animation, not a transition, so the resting state
   is the VISIBLE one. If animations never run — reduced motion, a throttled
   background tab, an old engine — the dialog simply appears, instead of
   sitting at opacity 0 while still covering the page. */
.enq-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,14,23,0.55);
  backdrop-filter: blur(3px);
}
.enq-modal.is-open .enq-modal__backdrop { animation: enqFade .22s var(--ease); }

.enq-modal__panel {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: clamp(28px, 5vw, 38px);
  text-align: center;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.enq-modal.is-open .enq-modal__panel { animation: enqRise .24s var(--ease); }

@keyframes enqFade { from { opacity: 0; } }
/* Transform only — never opacity. Sending via WhatsApp opens a new tab, which
   backgrounds this page and freezes its animations at the first keyframe; an
   opacity-based entry would leave the panel invisible when the visitor comes
   back. A 14px offset is the worst this can look. */
@keyframes enqRise {
  from { transform: translateY(14px) scale(.97); }
}

.enq-modal__tick {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.enq-modal__tick svg { width: 28px; height: 28px; }

.enq-modal__title {
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--ink);
  margin-bottom: 10px;
}
.enq-modal__body {
  color: var(--body);
  margin-bottom: 24px;
}
.enq-modal__close { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .enq-modal.is-open .enq-modal__backdrop,
  .enq-modal.is-open .enq-modal__panel { animation: none; }
}

/* ---------------------------------------------------------
   Contact page — WhatsApp row in the info card
   --------------------------------------------------------- */
.inforow--wa .inforow__ico { color: #128C46; }

/* ---------------------------------------------------------
   Footer contact block
   --------------------------------------------------------- */
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 20px;
}
.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--on-brand-dim);
  font-size: 1rem;
  transition: color .25s;
  overflow-wrap: anywhere;
}
.footer__contact a:hover,
.footer__contact a:focus-visible { color: #fff; }
.footer__contact svg { flex: none; }

/* Topbar WhatsApp glyph is a filled icon; keep it optically level with
   the stroked mail icon beside it. */
.topbar__contacts svg { flex: none; }
