/* AMIC Quality page (post 16570) — Figma spec-match QC overrides.
 * Figma: file tN8ZftPfIVdZqJTbwuqjee, frame 1123:7970 "Quality" (1440px).
 * Staging only (guarded in amic-quality-qc.php: dev_amici / amici.anoram.com).
 * Rollback: delete amic-quality-qc.php + amic-quality-qc.css from mu-plugins.
 */

/* M3 — "Quality Management & Process Compliance" card titles.
 * Figma: Lato 20 / w700 / #23385F.  Live was: w400 / #4A5257. */
.elementor-16570 .elementor-element-b9a37f3 .elementor-heading-title,
.elementor-16570 .elementor-element-3e6c2b3 .elementor-heading-title,
.elementor-16570 .elementor-element-1843d6e .elementor-heading-title,
.elementor-16570 .elementor-element-27b77db .elementor-heading-title,
.elementor-16570 .elementor-element-bc19e34 .elementor-heading-title,
.elementor-16570 .elementor-element-4a5e43c .elementor-heading-title,
.elementor-16570 .elementor-element-72300ee .elementor-heading-title {
  font-weight: 700 !important;
  color: #23385F !important;
}

/* M4 — "Safety, Health & Environmental Compliance" card titles.
 * Figma: Lato 20 / w700 / #C1391E.  Live was: w400 / #4A5257. */
.elementor-16570 .elementor-element-b46d9cb .elementor-heading-title,
.elementor-16570 .elementor-element-3ce5db1 .elementor-heading-title,
.elementor-16570 .elementor-element-6e4be5e .elementor-heading-title,
.elementor-16570 .elementor-element-6d8470b .elementor-heading-title,
.elementor-16570 .elementor-element-30e0a10 .elementor-heading-title,
.elementor-16570 .elementor-element-0f0e6ac .elementor-heading-title {
  font-weight: 700 !important;
  color: #C1391E !important;
}

/* M10 — Section headings "Our Process" / "Quality Testing Facilities" /
 * "Certifications, Approvals & Compliance": live 45px / lh 54 -> Figma 46px / lh 55.2. */
.elementor-16570 .elementor-element-f4622f3 .elementor-heading-title,
.elementor-16570 .elementor-element-4102c89 .elementor-heading-title,
.elementor-16570 .elementor-element-32187b1 .elementor-heading-title {
  font-size: 46px !important;
  line-height: 55.2px !important;
}

/* M11 — Wrap-matching to Figma box widths (frame 1123:7970, amic-qc deltas). */
/* "Optical Emission Spectrometer (Spectromax X- Germany)" -> Figma 441px (2 lines).
 * It is an icon-box title, not a heading widget. */
.elementor-16570 .elementor-element-a71b20d .elementor-icon-box-title {
  max-width: 441px !important;
}
/* Industry-Standards labels: live box 143px forces an extra line; Figma box 159px. */
.elementor-16570 .elementor-element-bd2b8c2 .elementor-heading-title,
.elementor-16570 .elementor-element-83cd4fd .elementor-heading-title,
.elementor-16570 .elementor-element-6afe600 .elementor-heading-title,
.elementor-16570 .elementor-element-64f63b3 .elementor-heading-title {
  width: 159px !important;
  max-width: 159px !important;
}
/* "NABL Accredited\nLaboratory" / "Vendor\nRegistration": the source carries newlines
 * that HTML collapses to spaces; honour them so each renders 2 lines like Figma. */
.elementor-16570 .elementor-element-fb30246 .elementor-heading-title,
.elementor-16570 .elementor-element-0ee804f .elementor-heading-title,
.elementor-16570 .elementor-element-a3daeb8 .elementor-heading-title {
  white-space: pre-line !important;
}
/* M12 — "Inspection and Testing" gallery: Figma lays it out in 3 COLUMNS (~360px cells),
 * so every caption fits on one line. Live used 4 columns (291px cells), wrapping the long
 * captions. Match Figma with 3 columns in the content width (~395px cells, 9 images = 3 rows). */
.elementor-16570 .amic-review-gallery-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* M5 — Section intro paragraphs (Certifications intro, Industry Standards intro).
 * Figma: Lato 18 / #4A5257 / line-height 23.  Live was: rgba(0,0,0,.6) / lh 27. */
.elementor-16570 .elementor-element-1e70da9 .elementor-heading-title,
.elementor-16570 .elementor-element-896713c .elementor-heading-title {
  color: #4A5257 !important;
  line-height: 23px !important;
}

/* M6 — "Inspection and Testing" gallery captions.
 * Figma: Lato 18 / #4A5257 / line-height 23.  Live was: 16px / #000 / lh 22. */
.elementor-16570 .amic-supplied-gallery figcaption {
  font-size: 18px !important;
  line-height: 23px !important;
  color: #4A5257 !important;
}

/* M7 — Certification status lines ("Valid as per…", "Active / Renewable", etc.).
 * Figma: Lato 16 / #4A5257 / line-height 21.  Live was: lh 24. */
.elementor-16570 .elementor-element-1dfd573 .elementor-heading-title,
.elementor-16570 .elementor-element-48c7f01 .elementor-heading-title,
.elementor-16570 .elementor-element-12a030a .elementor-heading-title,
.elementor-16570 .elementor-element-c58f1ac .elementor-heading-title,
.elementor-16570 .elementor-element-8ebf73a .elementor-heading-title {
  line-height: 21px !important;
}

/* M8 — Per-card description paragraphs under QM + Safety card titles.
 * Figma: Lato 18 / 400 / #4A5257 / line-height 23. Injected by amic-quality-qc.js
 * (the live cards had only icon + title; the description paragraph was missing). */
.elementor-16570 .amic-card-desc {
  flex: 0 0 100%;
  max-width: 100%;
  margin: 10px 0 0;
  font-family: "Lato", sans-serif;
  font-size: 18px;
  line-height: 23px;
  font-weight: 400;
  color: #4A5257;
  letter-spacing: 0;
}
/* The card is a flex row [icon | title]; let the injected description wrap to its
 * own full-width line beneath, instead of competing as a third row item. */
.elementor-16570 .e-con:has(> .amic-card-desc) {
  flex-wrap: wrap !important;
  align-content: flex-start;
}
/* Title must fill the row beside the icon (Figma title box ~524px) so one-line
 * Figma titles stay one line; also clear the theme's negative letter-spacing. */
.elementor-16570 .e-con:has(> .amic-card-desc) > .elementor-widget-heading {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
}
.elementor-16570 .e-con:has(> .amic-card-desc) .elementor-heading-title {
  letter-spacing: 0 !important;
}

/* =========================================================================
 * M2 — "Ask for Certificate" CTA + "Get Your Certification" popup.
 * Figma: trigger Lato 18 #C1391E on the ISO 9001 / NABL / IBR cards;
 * clicking opens a centred modal (Figma Frame 1000002707) over a dim overlay
 * (Rectangle 30 = #121C22 @ 80%). Submit is intentionally inert pending the PDF.
 * ===================================================================== */

/* Trigger link, appended into the 3 certification cards by amic-quality-qc.js */
.elementor-16570 .amic-askcert {
  display: inline-block;
  margin-top: 8px;
  font-family: "Lato", sans-serif;
  font-size: 18px !important;
  line-height: 21.6px !important;
  font-weight: 400;
  color: #C1391E;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.elementor-16570 .amic-askcert:hover,
.elementor-16570 .amic-askcert:focus-visible { text-decoration: underline; }

/* Overlay */
.amic-cert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 34, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100000;
}
.amic-cert-overlay[hidden] { display: none; }
body.amic-cert-open { overflow: hidden; }

/* Modal box — Figma 624px, 42px padding, sharp corners, white */
.amic-cert-modal {
  position: relative;
  width: 624px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #FFFFFF;
  padding: 42px;
  font-family: "Lato", sans-serif;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Close X — Figma Group 79, top-right 20x20 */
.amic-cert-modal .amic-cert-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none !important;
  cursor: pointer;
  color: #121C22;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
}
.amic-cert-modal .amic-cert-close::before,
.amic-cert-modal .amic-cert-close::after { content: none !important; display: none !important; }

/* Header */
.amic-cert-head { margin-bottom: 42px; }
.amic-cert-head h2 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 48px;
  font-weight: 700;
  color: #000000;
}
.amic-cert-head p {
  margin: 0;
  font-size: 18px;
  line-height: 27px;
  font-weight: 400;
  color: #000000;
}

/* Fields — 20px gap between, 4px label->input */
.amic-cert-field { margin-bottom: 20px; }
.amic-cert-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: #000000;
}
.amic-cert-field label span { color: #C1391E; }
.amic-cert-field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #878787;
  border-radius: 0;
  background: #FFFFFF;
  font-family: "Lato", sans-serif;
  font-size: 16px;
  color: #000000;
  box-sizing: border-box;
}
.amic-cert-field input:focus { outline: none; border-color: #386FB3; }

/* Footer — consent row + submit */
.amic-cert-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 22px 0 12px;
}
.amic-cert-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  border: 1px solid #878787;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
}
.amic-cert-consent input:checked {
  background: #386FB3;
  border-color: #386FB3;
}
.amic-cert-consent input:checked::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.amic-cert-consent span {
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: #000000;
}
.amic-cert-modal .amic-cert-submit {
  position: relative;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 0;
  background-color: #386FB3 !important;
  color: #FFFFFF !important;
  font-family: "Lato", sans-serif;
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
  cursor: pointer;
  text-transform: none !important;
  overflow: hidden;
}
.amic-cert-modal .amic-cert-submit::before,
.amic-cert-modal .amic-cert-submit::after { content: none !important; display: none !important; }
.amic-cert-modal .amic-cert-submit:hover { background-color: #2F5E97 !important; }
.amic-cert-modal .amic-cert-submit-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.amic-cert-modal .amic-cert-submit .amic-cert-arrow {
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  display: inline-block;
}
/* Inert-submit notice (submit endpoint pending the PDF) */
.amic-cert-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: #878787;
  text-align: center;
}
.amic-cert-note[hidden] { display: none; }

/* Post-submit confirmation (replaces the form on success) */
.amic-cert-success[hidden] { display: none; }
.amic-cert-success h2 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 48px;
  font-weight: 700;
  color: #000000;
}
.amic-cert-success p {
  margin: 0;
  font-size: 18px;
  line-height: 27px;
  color: #4A5257;
}

/* Mobile */
@media (max-width: 680px) {
  .amic-cert-modal { padding: 28px 20px; }
  .amic-cert-head { margin-bottom: 28px; }
  .amic-cert-head h2 { font-size: 26px; line-height: 34px; }
}
