:root {
  --consult-navy:#03285c;
  --consult-deep:#001a40;
  --consult-blue:#0878b4;
  --consult-cyan:#16c8df;
  --consult-ink:#112b4b;
}

body.xb-consult-open { overflow:hidden; }

.xb-consult-overlay {
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  padding:28px;
  background:rgba(0,18,44,.67);
  backdrop-filter:blur(8px);
  opacity:0;
  visibility:hidden;
  transition:opacity .22s ease,visibility .22s ease;
}

.xb-consult-overlay.is-open { opacity:1; visibility:visible; }

.xb-consult-modal {
  width:min(960px,calc(100vw - 56px));
  min-height:560px;
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  overflow:hidden;
  color:var(--consult-ink);
  background:#fff;
  border:1px solid rgba(165,205,223,.75);
  border-radius:16px;
  box-shadow:0 34px 90px rgba(0,18,48,.32);
  transform:translateY(18px) scale(.985);
  transition:transform .26s cubic-bezier(.2,.75,.25,1);
  position:relative;
}

.xb-consult-overlay.is-open .xb-consult-modal { transform:translateY(0) scale(1); }

.xb-consult-close {
  position:absolute;
  top:18px;
  right:18px;
  z-index:3;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  padding:0;
  color:#71859a;
  background:#f5f8fb;
  border:1px solid #e1e9ef;
  border-radius:50%;
  cursor:pointer;
  transition:color .2s ease,background .2s ease,transform .2s ease;
}

.xb-consult-close:hover { color:var(--consult-navy); background:#eaf6fa; transform:rotate(90deg); }
.xb-consult-close svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; }

.xb-consult-side {
  min-height:560px;
  padding:46px 38px 36px;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(circle at 105% 0,rgba(22,200,223,.3),transparent 34%),
    linear-gradient(155deg,#052f68 0%,#032659 46%,#001a40 100%);
  position:relative;
}

.xb-consult-side::before {
  content:"";
  position:absolute;
  inset:0;
  opacity:.35;
  background-image:
    linear-gradient(rgba(78,194,226,.13) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,194,226,.13) 1px,transparent 1px);
  background-size:34px 34px;
  transform:perspective(420px) rotateX(61deg) scale(1.5) translateY(31%);
  transform-origin:center bottom;
}

.xb-consult-side::after {
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  right:-110px;
  bottom:-90px;
  border:1px solid rgba(55,218,238,.28);
  border-radius:50%;
  box-shadow:0 0 0 30px rgba(23,184,215,.035),0 0 0 64px rgba(23,184,215,.025);
}

.xb-consult-side > * { position:relative; z-index:1; }
.xb-consult-logo { width:238px; height:74px; overflow:hidden; background:#fff; border-radius:8px; box-shadow:0 12px 30px rgba(0,12,37,.18); position:relative; }
.xb-consult-logo img { position:absolute; width:294px; max-width:none; height:auto; left:-28px; top:-43px; }
.xb-consult-positioning { margin-top:56px; }
.xb-consult-positioning > span { color:#72e5f1; font-size:14px; font-weight:700; letter-spacing:.18em; }
.xb-consult-positioning h2 { margin:10px 0 4px; color:#fff; font-size:32px; line-height:1.25; }
.xb-consult-positioning p { margin:0; color:#fff; font-size:22px; font-weight:700; line-height:1.55; letter-spacing:.02em; }
.xb-consult-contact { position:absolute; left:16px; right:12px; bottom:18px; display:grid; gap:3px; margin:0; font-style:normal; }
.xb-consult-contact div { display:grid; gap:0; }
.xb-consult-contact small { color:#67d4e6; font-size:15px; line-height:1.3; letter-spacing:0; }
.xb-consult-contact a,.xb-consult-contact span { color:#fff; font-size:16px; line-height:1.3; word-break:normal; white-space:nowrap; }
.xb-consult-contact a:hover { color:#fff; }
.xb-consult-side-qr { display:none; }

.xb-consult-main { padding:46px 48px 36px; background:linear-gradient(180deg,#fff 0%,#fbfdff 100%); }
.xb-consult-main h2 { margin:0 52px 8px 0; color:var(--consult-ink); font-size:27px; line-height:1.35; }
.xb-consult-subtitle { margin:0 0 25px; color:#687d92; font-size:14px; }
.xb-consult-form { display:grid; gap:12px; }
.xb-consult-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.xb-field { min-width:0; position:relative; }
.xb-field label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.xb-field input,.xb-field textarea,.xb-phone-prefix {
  width:100%;
  color:#1e3856;
  background:#fff;
  border:1px solid #dbe5ed;
  border-radius:7px;
  outline:none;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.xb-field input { height:46px; padding:0 14px; font-size:14px; }
.xb-field textarea { height:154px; padding:13px 14px; resize:none; font:14px/1.65 inherit; }
.xb-field input:focus,.xb-field textarea:focus { border-color:#48a9c7; box-shadow:0 0 0 3px rgba(22,178,211,.11); background:#fcfeff; }
.xb-field input::placeholder,.xb-field textarea::placeholder { color:#9daab7; }
.xb-required::placeholder { color:#8796a6!important; }
.xb-phone { display:grid; grid-template-columns:104px 1fr; }
.xb-phone-prefix { height:46px; display:flex; align-items:center; justify-content:center; gap:12px; border-radius:7px 0 0 7px; border-right:0; color:#4b637b; font-size:14px; }
.xb-phone-prefix::after { content:""; width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid #92a0ae; }
.xb-phone input { border-radius:0 7px 7px 0; }
.xb-code { display:grid; grid-template-columns:1fr 118px; }
.xb-code input { border-radius:7px 0 0 7px; }
.xb-code button { height:46px; padding:0 14px; color:#0b88ae; background:#fff; border:1px solid #dbe5ed; border-left:0; border-radius:0 7px 7px 0; cursor:pointer; font-size:13px; font-weight:700; }
.xb-code button:hover { background:#edfafd; }
.xb-consult-actions { margin-top:4px; display:grid; grid-template-columns:1fr 144px; gap:28px; align-items:end; }
.xb-submit-area { min-width:0; }
.xb-submit { width:100%; height:48px; display:inline-flex; align-items:center; justify-content:center; gap:10px; color:#fff; background:linear-gradient(100deg,#075d9c,#09a8c9); border:0; border-radius:7px; cursor:pointer; font-size:15px; font-weight:700; box-shadow:0 10px 24px rgba(7,112,162,.18); transition:transform .2s ease,box-shadow .2s ease; }
.xb-submit:hover { transform:translateY(-2px); box-shadow:0 14px 28px rgba(7,112,162,.26); }
.xb-submit:disabled { cursor:wait; opacity:.72; transform:none; box-shadow:none; }
.xb-submit svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; }
.xb-qr-wrap { width:144px; display:grid; justify-items:center; gap:7px; }
.xb-qr-slot { width:144px; height:144px; display:flex; align-items:center; justify-content:center; overflow:hidden; color:#6c879b; background:#fff; border:1px solid #c7dce6; border-radius:9px; }
.xb-qr-slot img { width:100%; height:100%; display:block; object-fit:contain; }
.xb-qr-slot > span { width:40px; height:40px; display:grid; place-items:center; color:#1598b9; }
.xb-qr-slot svg { width:34px; height:34px; fill:none; stroke:currentColor; stroke-width:1.6; }
.xb-qr-slot strong { margin-top:8px; color:#35546d; font-size:13px; }
.xb-qr-slot img { width:100%; height:100%; display:block; object-fit:contain; border-radius:7px; }
.xb-qr-caption { color:#718a9d; font-size:11px; line-height:1.4; text-align:center; }
.xb-form-note { min-height:36px; margin:12px 0 0; color:#8091a1; font-size:12px; line-height:1.5; }
.xb-form-note:empty { display:none; }
.xb-form-note.is-success { color:#0a829e; }
.xb-form-note.is-error { color:#c54b4b; }
.xb-form-note.is-success,.xb-form-note.is-error { display:block!important; }

@media (max-width:760px) {
  .xb-consult-overlay { padding:14px; align-items:start; overflow:auto; }
  .xb-consult-modal { width:100%; grid-template-columns:1fr; margin:18px 0; }
  .xb-consult-side { min-height:auto; padding:30px 25px; }
  .xb-consult-positioning { margin-top:34px; }
  .xb-consult-positioning h2 { font-size:27px; }
  .xb-consult-positioning p { font-size:19px; }
  .xb-consult-contact { position:relative; left:auto; right:auto; bottom:auto; margin-top:38px; }
  .xb-consult-main { padding:30px 24px; }
  .xb-consult-row,.xb-consult-actions { grid-template-columns:1fr; }
  .xb-qr-wrap { display:none; }
}

@media (prefers-reduced-motion:reduce) {
  .xb-consult-overlay,.xb-consult-modal,.xb-consult-close,.xb-submit { transition:none!important; }
}
