/**
 * Conversational enquiry, one question at a time, finishing on WhatsApp.
 *
 * Scoped under #wdt-chat so the generic class names never touch the rest of
 * the site. Colours come from the theme tokens already on :root; only the
 * chat-bubble tokens are added here, for light and the site's data-theme dark.
 *
 * @package WDT
 */

#wdt-chat{
  --chat-bg:#eceff5; --wa:#1faa54; --wa-bub:#d7f7c9; --wa-bub-ink:#10231a; --wa-time:#5c7a68;
  --wc-shadow:0 24px 60px rgba(20,42,114,.12);
  max-width:540px;
}
:root[data-theme="dark"] #wdt-chat{
  --chat-bg:#0c1119; --wa:#35d07f; --wa-bub:#164a34; --wa-bub-ink:#dff3e9; --wa-time:#86b79c;
  --wc-shadow:0 24px 60px rgba(0,0,0,.5);
}

#wdt-chat *{box-sizing:border-box}
.wc-card{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--wc-shadow);overflow:hidden}
.wc-prog{height:4px;background:var(--surface-2)}
.wc-prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--blue),var(--blue-soft));border-radius:0 4px 4px 0;transition:width .45s cubic-bezier(.4,0,.2,1)}
.wc-in{padding:26px 26px 24px}
@media(max-width:480px){.wc-in{padding:22px 18px}}
.wc-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:12px}
.wc-no{font-size:11px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--ink-soft);white-space:nowrap}
.wc-brand{display:flex;align-items:center;gap:8px;font-family:var(--font-d);font-weight:600;font-size:13.5px;letter-spacing:-.01em;color:var(--ink)}
.wc-brand b{color:var(--blue);font-weight:800}
.wc-q{font-family:var(--font-d);font-weight:600;letter-spacing:-.02em;font-size:clamp(20px,5vw,25px);line-height:1.2;margin:0 0 6px;color:var(--ink)}
.wc-sub{color:var(--ink-soft);font-size:13.5px;margin:0 0 18px}

.wc-opts{display:grid;gap:9px;margin-bottom:2px}
.wc-opt{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:14px 15px;border:1.5px solid var(--line);background:var(--surface);
  border-radius:13px;cursor:pointer;font-family:var(--font-b);font-size:14.5px;color:var(--ink);transition:border-color .15s,background .15s,transform .05s}
.wc-opt:hover{border-color:var(--blue-soft)}
.wc-opt:active{transform:scale(.995)}
.wc-opt .wc-ic{flex:0 0 auto;width:34px;height:34px;border-radius:9px;background:var(--blue-tint);color:var(--blue);display:grid;place-items:center}
.wc-opt .wc-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wc-opt .wc-lbl{flex:1 1 auto;font-weight:600}
.wc-opt .wc-tick{flex:0 0 auto;width:22px;height:22px;border-radius:7px;border:1.5px solid var(--line);display:grid;place-items:center;transition:.15s}
.wc-opt .wc-tick svg{width:13px;height:13px;stroke:#fff;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:.15s}
.wc-opt[aria-pressed="true"]{border-color:var(--blue);background:color-mix(in srgb,var(--blue) 7%,var(--surface))}
.wc-opt[aria-pressed="true"] .wc-tick{background:var(--blue);border-color:var(--blue)}
.wc-opt[aria-pressed="true"] .wc-tick svg{opacity:1}

.wc-chips{display:flex;flex-wrap:wrap;gap:8px}
.wc-chip{padding:9px 14px;border:1.5px solid var(--line);background:var(--surface);border-radius:100px;font-size:13.5px;cursor:pointer;color:var(--ink);font-family:var(--font-b);transition:.15s}
.wc-chip:hover{border-color:var(--blue-soft)}
.wc-chip[aria-pressed="true"]{border-color:var(--blue);background:var(--blue);color:#fff}
.wc-flabel{font-size:12.5px;font-weight:700;letter-spacing:.3px;color:var(--ink-soft);margin:16px 0 8px;text-transform:uppercase;display:flex;gap:8px;align-items:baseline}
.wc-flabel:first-child{margin-top:0}
.wc-tag{font-size:11px;font-weight:600;color:var(--ink-soft);opacity:.75;text-transform:none;letter-spacing:0}
.wc-field input{width:100%;padding:13px 15px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font-size:15px;font-family:var(--font-b)}
.wc-field input::placeholder{color:var(--ink-soft);opacity:.7}
.wc-field input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 18%,transparent)}
.wc-field+.wc-field{margin-top:12px}

.wc-actions{display:flex;align-items:center;gap:12px;margin-top:22px}
.wc-sp{flex:1}
.wc-btn{font-family:var(--font-b);font-weight:600;font-size:15px;border:0;border-radius:12px;padding:13px 22px;cursor:pointer;display:inline-flex;align-items:center;gap:9px;transition:.15s;text-decoration:none}
.wc-btn-primary{background:var(--blue);color:#fff}
.wc-btn-primary:hover{background:var(--blue-deep)}
.wc-btn-primary[disabled]{opacity:.45;cursor:not-allowed}
.wc-btn-ghost{background:transparent;color:var(--ink-soft);padding:13px 6px}
.wc-btn-ghost:hover{color:var(--ink)}
.wc-btn-wa{background:var(--wa);color:#fff;width:100%;justify-content:center}
.wc-btn-wa:hover{filter:brightness(1.05)}
.wc-btn-copy{background:var(--surface-2);color:var(--ink);width:100%;justify-content:center;margin-top:10px}
.wc-back{background:none;border:0;color:var(--ink-soft);font-family:var(--font-b);font-size:14px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;padding:6px 2px}
.wc-back:hover{color:var(--ink)}
.wc-back svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.wc-step{animation:wcIn .4s cubic-bezier(.2,.7,.2,1)}
@keyframes wcIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.wc-done{text-align:center;padding:34px 26px 30px}
.wc-done .wc-burst{width:62px;height:62px;border-radius:50%;background:var(--blue-tint);color:var(--blue);display:grid;place-items:center;margin:0 auto 16px}
.wc-done .wc-burst svg{width:30px;height:30px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.wc-done h3{font-family:var(--font-d);font-weight:600;font-size:26px;letter-spacing:-.02em;margin:0 0 8px;color:var(--ink)}
.wc-done p{color:var(--ink-soft);font-size:14.5px;margin:0 auto 22px;max-width:34ch}
.wc-plabel{font-size:12px;color:var(--ink-soft);text-align:left;margin:0 0 9px;display:flex;align-items:center;gap:7px}
.wc-plabel::before{content:"";flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:var(--wa)}
.wc-chatwrap{text-align:left;background:var(--chat-bg);border:1px solid var(--line);border-radius:14px;padding:12px 12px 15px;margin:0 0 18px}
.wc-chathead{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.wc-chathead .wc-av{width:30px;height:30px;border-radius:50%;background:var(--blue);color:#fff;display:grid;place-items:center;font-family:var(--font-d);font-weight:800;font-size:12px;flex:0 0 auto}
.wc-chathead b{font-family:var(--font-d);font-size:13px;font-weight:600;display:block;line-height:1.15;color:var(--ink)}
.wc-chathead small{font-size:11px;color:var(--ink-soft)}
.wc-bubble{margin-left:auto;max-width:90%;width:fit-content;background:var(--wa-bub);color:var(--wa-bub-ink);
  padding:9px 12px 6px;border-radius:12px;border-top-right-radius:4px;font-size:13.5px;line-height:1.5;white-space:pre-line;box-shadow:0 1px 1px rgba(0,0,0,.09)}
.wc-bubble .wc-time{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:10px;color:var(--wa-time);margin-top:5px}
.wc-bubble .wc-time svg{width:16px;height:11px;stroke:#53bdeb;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.wc-foot{font-size:12.5px;color:var(--ink-soft);margin-top:16px;text-align:center}
.wc-foot a{color:var(--blue);font-weight:600;text-decoration:none}

.wc-switch{margin-top:14px;font-size:13px;color:var(--ink-soft)}
.wc-switch button{background:none;border:0;color:var(--blue);font-weight:600;cursor:pointer;font-family:var(--font-b);font-size:13px;padding:0}
.wc-toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(20px);background:var(--ink);color:var(--bg);
  padding:11px 18px;border-radius:100px;font-size:13.5px;font-weight:600;opacity:0;transition:.25s;pointer-events:none;z-index:50}
.wc-toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
.wc-err{background:color-mix(in srgb,#d64545 12%,var(--surface));border:1px solid color-mix(in srgb,#d64545 40%,var(--line));color:var(--ink);
  border-radius:10px;padding:11px 14px;font-size:13.5px;margin-bottom:16px}

@media (prefers-reduced-motion:reduce){#wdt-chat *{animation:none!important;transition:none!important}}

/* Two columns that read level on every step.
   Both columns stretch to the taller of the two. The enquiry card fills its
   column and its content is centred, so a SHORT step (the WhatsApp done screen,
   steps 2 and 3) is balanced rather than a small card beside a tall rail.
   On the TALL step (step 1) the right column is the shorter one, so its content
   is wrapped in .contact-rail and pinned, pinning beside the long form as you
   scroll instead of leaving a gap below it. Stacks on small screens. */
@media (min-width:861px){
  .contact-grid{align-items:stretch}
  .contact-grid > div{display:flex;flex-direction:column}
  #wdt-chat:not([hidden]){flex:1 1 auto;display:flex;flex-direction:column}
  #wdt-chat .wc-card{flex:1 1 auto;display:flex;flex-direction:column}
  #wdt-chat .wc-card > .wc-in{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center}
  .contact-grid > div:last-child .contact-rail{position:sticky;top:96px}
}

/* Filled blue uses the brand blue, so white text reads clearly on the dark
   site (the lighter dark-theme blue failed contrast, and the hover turned
   almost white). Darker blue on hover. 3.47.2 */
.wc-btn-primary,.wc-chip[aria-pressed="true"],.wc-opt[aria-pressed="true"] .wc-tick,.wc-chathead .wc-av{background:var(--blue-fill,#4169e1);border-color:var(--blue-fill,#4169e1)}
.wc-btn-primary:hover{background:#2f55c8}
