/* ============================================================
   KIMANS REDESIGN — CONTACT (D3 globe component)
   Ported from Mena's globe session. Pirulen + Play + IBM Plex Mono
   are already provided by the theme design system; tokens are scoped
   to .kx-contact so they don't leak globally.
   ============================================================ */

.kx-contact {
  /* component-local neutral scale */
  --n0:   #FFFFFF; --n25:  #FAFBFC; --n50:  #F4F6F8;
  --n100: #ECEFF2; --n200: #DDE2E8; --n300: #C4CCD4;
  --n400: #9AA4AE; --n500: #6E7A85; --n600: #515C66;
  --n700: #3A434B; --n800: #262C32;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.2, 0, 0.2, 1);

  display: grid;
  grid-template-columns: 430px 1fr;
  background: var(--n0);
  font-family: var(--font-sans);
  color: var(--kx-ink, #0D0D0D);
}

.kx-contact .kx-eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--n500);
}

/* Left column — intro + site list */
.kx-contact__intro {
  padding: 56px 48px 48px;
  border-right: 1px solid var(--n200);
  display: flex;
  flex-direction: column;
}
.kx-contact__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 14px 0 14px;
  color: var(--kx-ink, #0D0D0D);
}
.kx-contact__lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--n600);
  margin: 0 0 28px;
  max-width: 32ch;
}

.kx-sitelist { list-style: none; display: flex; flex-direction: column; margin: 0; padding: 0; }
.kx-sitelist li { border-top: 1px solid var(--n200); }
.kx-sitelist li:last-child { border-bottom: 1px solid var(--n200); }

.kx-site {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr 14px;
  align-items: center;
  gap: 14px;
  padding: 16px 6px 16px 10px;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background var(--ease-std) 160ms, border-color var(--ease-std) 160ms;
}
.kx-site:hover { background: var(--n50); }
.kx-site.is-active { background: var(--kx-amber-soft, #FFF3D1); border-left-color: var(--kx-amber, #FEBB19); }

.kx-site__no {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--n400);
  font-variant-numeric: tabular-nums;
}
.kx-site.is-active .kx-site__no { color: var(--kx-ink, #0D0D0D); }
.kx-site__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kx-site__kind { font-size: 10px; color: var(--n500); }
.kx-site.is-active .kx-site__kind { color: var(--kx-amber-strong, #F5A800); }
.kx-site__city { font-size: 17px; font-weight: 700; color: var(--kx-ink, #0D0D0D); line-height: 1.1; }
.kx-site__country { font-size: 13px; color: var(--n500); }
.kx-site__dot {
  width: 8px; height: 8px; border-radius: 999px;
  border: 1.5px solid var(--n400); background: var(--n0);
  justify-self: center; transition: all var(--ease-std) 160ms;
}
.kx-site:hover .kx-site__dot { border-color: var(--kx-ink, #0D0D0D); }
.kx-site.is-active .kx-site__dot { background: var(--kx-amber, #FEBB19); border-color: var(--kx-ink, #0D0D0D); }

.kx-reset {
  margin-top: 22px; align-self: flex-start;
  background: transparent; border: 1px solid var(--n300); border-radius: 4px;
  padding: 9px 14px; font-family: var(--font-sans); font-size: 12.5px; color: var(--n600);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), border-color 160ms, color 160ms;
}
.kx-reset.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.kx-reset:hover { border-color: var(--kx-ink, #0D0D0D); color: var(--kx-ink, #0D0D0D); }

/* Right column — globe stage */
.kx-stage {
  display: grid; grid-template-columns: 1fr 288px; align-items: center; gap: 8px;
  padding: 40px 44px 40px 28px;
  background: radial-gradient(120% 120% at 38% 42%, var(--n25) 0%, var(--n50) 70%);
}
.kx-stage__globe { position: relative; justify-self: center; display: grid; place-items: center; }
.kx-stage__globe canvas { display: block; }
.kx-stage__status {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--n500);
  white-space: nowrap; transition: opacity 200ms var(--ease-std);
}
.kx-stage__status[data-hidden="true"] { opacity: 0; }
.kx-stage__pulse {
  width: 7px; height: 7px; border-radius: 999px; background: var(--kx-amber, #FEBB19);
  box-shadow: 0 0 0 0 rgba(254, 187, 25, 0.5); animation: kx-pulse 1.6s var(--ease-std) infinite;
}
@keyframes kx-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(254, 187, 25, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(254, 187, 25, 0); }
  100% { box-shadow: 0 0 0 0   rgba(254, 187, 25, 0); }
}

/* Address card */
.kx-addr {
  background: var(--n0); border: 1px solid var(--n200); border-top: 2px solid var(--kx-amber, #FEBB19);
  border-radius: 6px; box-shadow: 0 12px 32px rgba(13, 13, 13, 0.10); padding: 22px 22px 20px;
  opacity: 0; transform: translateX(14px); pointer-events: none;
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.kx-addr[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
.kx-addr__index { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.kx-addr__index > span:first-child {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--kx-amber-strong, #F5A800); font-variant-numeric: tabular-nums;
}
.kx-addr__rule { flex: 1; height: 1px; background: var(--n200); }
.kx-addr__kind { font-size: 10px; margin-bottom: 8px; }
.kx-addr__name { font-family: var(--font-sans); font-weight: 700; font-size: 19px; line-height: 1.15; color: var(--kx-ink, #0D0D0D); margin-bottom: 4px; }
.kx-addr__org { font-size: 12.5px; color: var(--n500); margin-bottom: 16px; line-height: 1.4; }
.kx-addr__lines {
  display: flex; flex-direction: column; gap: 3px; font-family: var(--font-mono);
  font-size: 13px; line-height: 1.5; color: var(--n800); padding-top: 14px; border-top: 1px solid var(--n100);
}
.kx-addr__dir {
  display: inline-block; margin-top: 18px; font-family: var(--font-sans); font-size: 13px; font-weight: 700;
  color: var(--kx-ink, #0D0D0D); text-decoration: none; border-bottom: 2px solid var(--kx-amber, #FEBB19);
  padding-bottom: 2px; transition: color 140ms var(--ease-std), border-color 140ms var(--ease-std);
}
.kx-addr__dir:hover { color: var(--kx-amber-strong, #F5A800); border-color: var(--kx-amber-strong, #F5A800); }

/* ── Enquiry form (kept from the redesign) ── */
.kx-enquiry input:focus,
.kx-enquiry textarea:focus,
.kx-enquiry select:focus { outline: none; border-color: var(--accent, #FEBB19); box-shadow: var(--shadow-focus, 0 0 0 3px rgba(254,187,25,0.45)); }

/* ============================================================
   RFQ FORM — on-brand styling for BOTH the CF7 ("RFQ", id 1375)
   output and the front-end fallback form. CF7 emits bare
   browser controls otherwise, which reads as untrusted at the
   conversion moment; these rules give it the site's input system.
   ============================================================ */

/* Field container/label rhythm (CF7 wraps each control in a <p>) */
.kx-form-live .wpcf7-form p { margin: 0 0 14px; display: flex; flex-direction: column; gap: 7px; }
.kx-form-live .wpcf7-form label {
  font-family: var(--font-sans, 'Play', sans-serif);
  font-size: 10.5px; letter-spacing: .1em; color: #6E7A85; text-transform: uppercase;
  display: flex; flex-direction: column; gap: 7px;
}

/* Controls — CF7 output + fallback. ~52px tall, 1px #DDE2E8, 3px radius. */
.kx-form-live .wpcf7-form input[type="text"],
.kx-form-live .wpcf7-form input[type="email"],
.kx-form-live .wpcf7-form input[type="tel"],
.kx-form-live .wpcf7-form input[type="url"],
.kx-form-live .wpcf7-form input[type="number"],
.kx-form-live .wpcf7-form select,
.kx-form-live .wpcf7-form textarea,
.kx-rfq-form input[type="text"],
.kx-rfq-form input[type="email"],
.kx-rfq-form input[type="tel"],
.kx-rfq-form select,
.kx-rfq-form textarea {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #DDE2E8;
  border-radius: 3px;
  background: #fff;
  font-family: var(--font-sans, 'Play', sans-serif);
  font-size: 15px;
  color: #0D0D0D;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.kx-form-live .wpcf7-form textarea,
.kx-rfq-form textarea { height: auto; min-height: 108px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.kx-form-live .wpcf7-form select,
.kx-rfq-form select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA4AE' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.kx-form-live .wpcf7-form input::placeholder,
.kx-form-live .wpcf7-form textarea::placeholder,
.kx-rfq-form input::placeholder,
.kx-rfq-form textarea::placeholder { color: #9AA4AE; }

.kx-form-live .wpcf7-form input:focus,
.kx-form-live .wpcf7-form select:focus,
.kx-form-live .wpcf7-form textarea:focus,
.kx-rfq-form input:focus,
.kx-rfq-form select:focus,
.kx-rfq-form textarea:focus {
  outline: none;
  border-color: var(--accent, #FEBB19);
  box-shadow: var(--shadow-focus, 0 0 0 3px rgba(254,187,25,0.45));
}

/* CF7 submit → amber filled, matching .kx-amberbtn */
.kx-form-live .wpcf7-form .wpcf7-submit {
  height: 54px; padding: 0 30px; margin-top: 8px;
  background: var(--accent, #FEBB19); color: #0D0D0D;
  border: 0; border-radius: 3px;
  font-family: var(--font-sans, 'Play', sans-serif); font-weight: 700; font-size: 15px;
  cursor: pointer; transition: background .18s ease;
}
.kx-form-live .wpcf7-form .wpcf7-submit:hover { background: var(--accent-strong, #F5A800); }
.kx-form-live .wpcf7-form .wpcf7-spinner { margin: 0 0 0 12px; }

/* CF7 validation + response messaging, on-brand */
.kx-form-live .wpcf7-not-valid-tip { color: #C0392B; font-size: 12px; font-family: var(--font-sans, 'Play', sans-serif); margin-top: 4px; }
.kx-form-live .wpcf7-form input.wpcf7-not-valid,
.kx-form-live .wpcf7-form select.wpcf7-not-valid,
.kx-form-live .wpcf7-form textarea.wpcf7-not-valid { border-color: #C0392B; }
.kx-form-live .wpcf7-response-output {
  margin: 18px 0 0; padding: 12px 16px; border-radius: 3px;
  font-family: var(--font-sans, 'Play', sans-serif); font-size: 14px; line-height: 1.5;
}
.kx-form-live .wpcf7-form.invalid .wpcf7-response-output,
.kx-form-live .wpcf7-form.unaccepted .wpcf7-response-output { border: 1px solid #E8C7C2; background: #FCF1EF; color: #8E2E22; }
.kx-form-live .wpcf7-form.sent .wpcf7-response-output { border: 1px solid #BFE3C9; background: #F0FAF2; color: #1F6B3A; }

/* ── Two-step RFQ wizard (progressive enhancement) ────────────
   No-JS: .kx-rfq-step blocks are plain stacked sections and every
   field is visible. JS adds .kx-rfq-2step to the form, which then
   reveals the step chrome and hides the inactive step.            */
.kx-rfq-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.kx-rfq-steps__item { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans, 'Play', sans-serif); font-size: 12.5px; color: #9AA4AE; }
.kx-rfq-steps__num {
  width: 22px; height: 22px; border-radius: 999px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: #ECEFF2; color: #6E7A85;
}
.kx-rfq-steps__item.is-active { color: #0D0D0D; font-weight: 700; }
.kx-rfq-steps__item.is-active .kx-rfq-steps__num { background: var(--accent, #FEBB19); color: #0D0D0D; }
.kx-rfq-steps__item.is-done .kx-rfq-steps__num { background: #0D0D0D; color: #fff; }
.kx-rfq-steps__bar { flex: 1; height: 1px; background: #DDE2E8; min-width: 16px; }
.kx-rfq-steps { display: none; }            /* shown only when JS enables stepping */
.kx-rfq-2step .kx-rfq-steps { display: flex; }

.kx-rfq-step__head { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6E7A85; font-weight: 700; margin: 0 0 14px; }
.kx-rfq-2step .kx-rfq-step[hidden] { display: none; }

.kx-rfq-nav { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.kx-rfq-nav { display: none; }              /* the per-step Back/Next row; only with JS */
.kx-rfq-2step .kx-rfq-nav { display: flex; }
.kx-rfq-2step .kx-rfq-finalsubmit-wrap { display: none; }  /* JS routes submit through step 2 */
.kx-rfq-back {
  height: 48px; padding: 0 20px; border-radius: 3px;
  background: #fff; border: 1px solid #DDE2E8; color: #0D0D0D;
  font-family: var(--font-sans, 'Play', sans-serif); font-weight: 700; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: border-color .15s ease;
}
.kx-rfq-back:hover { border-color: #0D0D0D; }
.kx-rfq-next {
  height: 48px; padding: 0 26px; border-radius: 3px;
  background: var(--accent, #FEBB19); color: #0D0D0D; border: 0;
  font-family: var(--font-sans, 'Play', sans-serif); font-weight: 700; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background .18s ease;
}
.kx-rfq-next:hover { background: var(--accent-strong, #F5A800); }
@media (prefers-reduced-motion: reduce) { .kx-rfq-back, .kx-rfq-next { transition: none; } }

/* ── Responsive ── */
@media (max-width: 960px) {
  .kx-contact { grid-template-columns: 1fr; }
  .kx-contact__intro { border-right: none; border-bottom: 1px solid var(--n200); padding: 40px 32px 32px; }
  .kx-stage { grid-template-columns: 1fr; padding: 32px 24px 48px; gap: 32px; }
  .kx-addr { transform: translateY(14px); }
  .kx-addr[data-open="true"] { transform: none; }
  .kx-enquiry-grid { grid-template-columns: 1fr !important; gap: 36px !important; }
}
@media (max-width: 480px) {
  .kx-contact__title { font-size: 30px; }
  .kx-contact__intro { padding: 32px 20px 24px; }
  .kx-stage { padding: 24px 16px 40px; }
  .kx-enquiry-fields { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) { .kx-stage__pulse { animation: none; } }

/* ---- 3-way intent router (Request a quote · Technical support · General) ---- */
.kx-intent-router {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.kx-intent-tab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #DDE2E8;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.kx-intent-tab:hover { border-color: #C4CCD4; }
.kx-intent-tab.is-active {
  border-color: var(--accent, #FEBB19);
  box-shadow: inset 0 0 0 1px var(--accent, #FEBB19);
  background: #FFFDF6;
}
.kx-intent-tab__title { font-size: 15.5px; font-weight: 700; color: #0D0D0D; }
.kx-intent-tab__sub { font-size: 12.5px; color: #6E7A85; }
.kx-intent-tab.is-active .kx-intent-tab__sub { color: #8A6D14; }
@media (max-width: 760px) {
  .kx-intent-router { grid-template-columns: 1fr; gap: 8px; }
  .kx-intent-tab { flex-direction: row; align-items: baseline; gap: 10px; padding: 13px 15px; }
  .kx-intent-tab__sub { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .kx-intent-tab { transition: none; } }
