/*
 * AgentBiz — a full-screen "moment" in 2026 liquid glass.
 *
 * A large centred modal (~2/3 of the screen) rendered as one frosted glass
 * sheet: translucent warm-white tint, heavy backdrop blur, hairline light
 * edges, soft inner sheen. No chatbot chrome — a minimal utility row (chat
 * history + close), a type-led canvas, and a premium ink send control.
 * Warm/beige palette to match the site: #F7F6F3 / #0E1526 / #D6211F.
 */

.ab-root {
  --ab-ink: #0e1526;
  --ab-muted: #59637a;
  --ab-red: #d6211f;
  --ab-red-2: #c2121f;
  --ab-red-tint: rgba(214, 33, 31, .12);
  --ab-glass: rgba(250, 249, 246, .72);
  --ab-glass-2: rgba(255, 255, 255, .55);
  --ab-edge: rgba(255, 255, 255, .6);
  --ab-hair: rgba(14, 21, 38, .07);
  --ab-user: rgba(14, 21, 38, .92);
  --ab-col: 720px; /* readable conversation column inside the wide modal */
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ab-panel[hidden] { display: none !important; }

/* ---- Backdrop: frost the whole page behind ------------------------------- */
.ab-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(11, 15, 26, .4);
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.ab-root.ab-open .ab-backdrop { opacity: 1; pointer-events: auto; }

/* ---- The glass sheet ------------------------------------------------------ */
.ab-panel {
  position: fixed; z-index: 1001;
  top: 50%; left: 50%;
  width: min(1060px, 94vw);
  height: min(90vh, 920px);
  transform: translate(-50%, -50%) scale(.96);
  display: flex; flex-direction: column;
  color: var(--ab-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 20%),
    var(--ab-glass);
  -webkit-backdrop-filter: blur(46px) saturate(1.7); backdrop-filter: blur(46px) saturate(1.7);
  border: 1px solid var(--ab-edge);
  border-radius: 30px;
  overflow: hidden;
  box-shadow:
    0 50px 140px -34px rgba(11, 15, 26, .55),
    0 12px 40px -20px rgba(11, 15, 26, .35),
    inset 0 1px 0 rgba(255, 255, 255, .8),
    inset 0 -1px 0 rgba(255, 255, 255, .18);
  opacity: 0;
  transition: transform .34s cubic-bezier(.2, .9, .25, 1), opacity .26s ease;
}
.ab-root.ab-open .ab-panel { transform: translate(-50%, -50%) scale(1); opacity: 1; }

@media (max-width: 720px) {
  .ab-panel { top: 0; left: 0; transform: translateY(2%); width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .ab-root.ab-open .ab-panel { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .ab-panel, .ab-backdrop { transition: opacity .2s ease; } }

/* ---- Utility bar (history + close, no chatbot header) -------------------- */
.ab-bar { position: relative; display: flex; align-items: center; gap: .6rem; flex: none; padding: .85rem clamp(.9rem, 2.5vw, 1.3rem); }
.ab-histbtn {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--ab-glass-2); border: 1px solid var(--ab-edge); border-radius: 999px;
  padding: .5rem .85rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--ab-ink); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .15s, box-shadow .15s;
}
.ab-histbtn:hover { background: rgba(255, 255, 255, .8); box-shadow: 0 8px 20px -12px rgba(14, 21, 38, .3); }
.ab-histbtn svg { width: 15px; height: 15px; opacity: .7; }
.ab-histbtn .ab-chev { transition: transform .2s ease; }
.ab-histbtn[aria-expanded="true"] .ab-chev { transform: rotate(180deg); }
.ab-spacer { flex: 1 1 auto; }
.ab-close {
  width: 40px; height: 40px; border: 1px solid var(--ab-edge); border-radius: 50%; cursor: pointer;
  background: var(--ab-glass-2); color: var(--ab-muted); display: grid; place-items: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .16s, color .16s, transform .1s;
}
.ab-close:hover { background: #fff; color: var(--ab-ink); }
.ab-close:active { transform: scale(.92); }
.ab-close svg { width: 18px; height: 18px; }

/* ---- History dropdown ----------------------------------------------------- */
.ab-menu {
  position: absolute; top: calc(100% - .2rem); left: clamp(.9rem, 2.5vw, 1.3rem); z-index: 5;
  width: min(340px, calc(100vw - 2rem)); max-height: 60vh; overflow-y: auto;
  background: rgba(252, 251, 249, .92); border: 1px solid var(--ab-edge); border-radius: 18px;
  -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: 0 30px 70px -24px rgba(11, 15, 26, .5), inset 0 1px 0 rgba(255, 255, 255, .7);
  padding: .5rem; opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .18s ease, transform .18s cubic-bezier(.2, .9, .25, 1);
}
.ab-menu.ab-menu-open { opacity: 1; transform: none; pointer-events: auto; }
.ab-menu-item {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 12px; padding: .7rem .75rem; font: inherit; cursor: pointer; color: var(--ab-ink);
  transition: background .13s;
}
.ab-menu-item:hover { background: rgba(14, 21, 38, .06); }
.ab-menu-item .ab-mi-ic { flex: none; width: 17px; height: 17px; color: var(--ab-muted); }
.ab-menu-item .ab-mi-t { flex: 1 1 auto; min-width: 0; font-size: .9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-menu-item .ab-mi-d { flex: none; font-size: .74rem; color: #97a0ad; }
.ab-menu-item.ab-mi-new { font-weight: 700; color: var(--ab-red-2); }
.ab-menu-item.ab-mi-new .ab-mi-ic { color: var(--ab-red-2); }
.ab-menu-sep { height: 1px; background: var(--ab-hair); margin: .35rem .4rem; }
.ab-menu-empty { padding: .7rem .75rem 1rem; font-size: .84rem; color: #97a0ad; }
.ab-menu-cap { padding: .5rem .75rem .3rem; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #a4acb8; }

/* ---- Messages (centred readable column) ---------------------------------- */
.ab-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.ab-scroll::-webkit-scrollbar { width: 10px; }
.ab-scroll::-webkit-scrollbar-thumb { background: rgba(14, 21, 38, .14); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
.ab-wrap { max-width: var(--ab-col); margin: 0 auto; padding: clamp(.5rem, 2vh, 1.5rem) clamp(1.1rem, 3vw, 1.5rem) 1.75rem; display: flex; flex-direction: column; }

.ab-intro { text-align: center; padding: clamp(1.5rem, 7vh, 4.5rem) 0 2rem; }
.ab-intro .ab-eyebrow { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ab-red-2); margin-bottom: 1rem; }
.ab-intro h4 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.035em; margin: 0 0 .7rem; line-height: 1.05; }
.ab-intro p { font-size: 1.06rem; color: var(--ab-muted); margin: 0 auto; max-width: 44ch; line-height: 1.55; }

.ab-msg { max-width: 86%; border-radius: 20px; padding: .85rem 1.15rem; font-size: 1rem; line-height: 1.62; margin-bottom: .7rem; word-wrap: break-word; }
.ab-msg.ab-user {
  align-self: flex-end; margin-left: auto; color: #f3f6fb; border-bottom-right-radius: 7px;
  background: var(--ab-user); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 8px 22px -12px rgba(14, 21, 38, .5);
}
.ab-msg.ab-bot {
  align-self: flex-start; max-width: 92%; color: var(--ab-ink); border-bottom-left-radius: 7px;
  background: rgba(255, 255, 255, .62); border: 1px solid var(--ab-edge);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -18px rgba(14, 21, 38, .3), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.ab-msg.ab-bot p { margin: 0 0 .6rem; }
.ab-msg.ab-bot p:last-child { margin-bottom: 0; }
.ab-msg.ab-bot strong { font-weight: 800; }
.ab-msg.ab-bot ul { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
.ab-msg.ab-bot li { margin: .2rem 0; }
.ab-row { display: flex; flex-direction: column; }

/* inline action buttons inside a reply (e.g. on an error) */
.ab-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.ab-action {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--ab-edge); border-radius: 12px; padding: .55rem .95rem;
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none;
  background: rgba(255, 255, 255, .65); color: var(--ab-ink);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .15s, transform .1s, filter .15s, box-shadow .15s;
}
.ab-action:hover { background: #fff; box-shadow: 0 8px 20px -12px rgba(14, 21, 38, .3); }
.ab-action:active { transform: scale(.97); }
.ab-action svg { width: 15px; height: 15px; }
.ab-action-primary { background: var(--ab-ink); color: #fff; border-color: transparent; }
.ab-action-primary:hover { background: #1c2740; box-shadow: 0 8px 20px -12px rgba(14, 21, 38, .5); }
.ab-action-plain { background: transparent; border-color: transparent; color: var(--ab-muted); padding-left: .55rem; padding-right: .55rem; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ab-action-plain:hover { background: transparent; box-shadow: none; color: var(--ab-ink); }

.ab-typing {
  align-self: flex-start; display: inline-flex; gap: 5px; padding: 1rem 1.15rem; margin-bottom: .7rem;
  background: rgba(255, 255, 255, .62); border: 1px solid var(--ab-edge); border-radius: 20px; border-bottom-left-radius: 7px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ab-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ab-ink); opacity: .4; animation: ab-typing 1.2s infinite; }
.ab-typing i:nth-child(2) { animation-delay: .15s; } .ab-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ab-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .3; } 30% { transform: translateY(-4px); opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .ab-typing i { animation: none; } }

/* ---- Starter chips (glass pills) ----------------------------------------- */
.ab-chips { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .5rem; }
.ab-chip {
  background: var(--ab-glass-2); color: var(--ab-ink); border: 1px solid var(--ab-edge);
  border-radius: 16px; padding: 1rem 1.15rem; font: inherit; font-size: .98rem; font-weight: 600;
  cursor: pointer; text-align: left;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .16s cubic-bezier(.2, .9, .25, 1), background .16s, box-shadow .16s;
}
.ab-chip:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .82); box-shadow: 0 14px 30px -16px rgba(14, 21, 38, .32); }
@media (max-width: 560px) { .ab-chips { grid-template-columns: 1fr; } }

/* ---- Lead capture card ---------------------------------------------------- */
.ab-lead {
  align-self: stretch; margin: .4rem 0 .8rem;
  background: rgba(255, 255, 255, .55); border: 1px solid var(--ab-edge); border-radius: 22px; padding: 1.4rem;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 18px 40px -24px rgba(14, 21, 38, .3);
}
.ab-lead h5 { margin: 0 0 .25rem; font-size: 1.2rem; font-weight: 800; letter-spacing: -.015em; }
.ab-lead p { margin: 0 0 1rem; font-size: .93rem; color: var(--ab-muted); line-height: 1.5; }
.ab-field { margin-bottom: .65rem; }
.ab-input {
  width: 100%; box-sizing: border-box; padding: .85rem 1rem; font: inherit; font-size: .98rem;
  color: var(--ab-ink); background: rgba(255, 255, 255, .7); border: 1px solid var(--ab-edge);
  border-radius: 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.ab-input::placeholder { color: #929aa8; }
.ab-input:focus { border-color: rgba(214, 33, 31, .5); box-shadow: 0 0 0 4px var(--ab-red-tint); }
/* Force 16px on mobile so iOS Safari doesn't zoom the page on field focus. */
@media (max-width: 720px) { .ab-input, .ab-textarea { font-size: 16px; } }
.ab-lead-actions { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.ab-lead-err { font-size: .84rem; color: var(--ab-red-2); margin: .1rem 0 .5rem; min-height: 0; }
.ab-lead-note { font-size: .78rem; color: #8b93a0; margin-top: .7rem; }

/* ---- Setup-plan wizard ---------------------------------------------------- */
.ab-wiz { max-width: 520px; align-self: center; }
.ab-wiz-eyebrow {
  display: block; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 700; color: var(--ab-muted); margin-bottom: .55rem;
}
.ab-wiz-prog { display: flex; gap: .35rem; margin: 0 0 1rem; }
.ab-dot { flex: 1; height: 5px; border-radius: 3px; background: rgba(14, 21, 38, .1); transition: background .2s ease; }
.ab-dot-on { background: var(--ab-red); }
.ab-wiz-q { margin: 0 0 1rem; font-size: 1.28rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
.ab-opts { display: flex; flex-direction: column; gap: .55rem; }
.ab-opt {
  text-align: left; font: inherit; font-size: .98rem; font-weight: 600; color: var(--ab-ink);
  background: rgba(255, 255, 255, .7); border: 1px solid var(--ab-edge); border-radius: 14px;
  padding: .85rem 1.05rem; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ab-opt:hover {
  transform: translateY(-1px); background: rgba(255, 255, 255, .92);
  border-color: rgba(214, 33, 31, .45); box-shadow: 0 14px 30px -16px rgba(14, 21, 38, .32);
}
.ab-opt:active { transform: translateY(0); }
.ab-root.ab-planmode .ab-composer { display: none; } /* tap-only — no chat composer */
.ab-root.ab-planmode .ab-histbtn { display: none; }  /* form mode — no chat-history dropdown */
.ab-wiz-done { text-align: center; }
.ab-done-ic { width: 46px; height: 46px; border-radius: 50%; background: #16a34a; color: #fff; display: flex; align-items: center; justify-content: center; margin: .2rem auto 1rem; }
.ab-done-ic svg { width: 24px; height: 24px; }
.ab-wiz-done .ab-btn-wa { display: inline-flex; margin-top: 1rem; }

/* ---- Composer (glass) ----------------------------------------------------- */
.ab-composer { flex: none; padding: .6rem clamp(1.1rem, 3vw, 1.5rem) 1.2rem; }
.ab-composer-in { max-width: var(--ab-col); margin: 0 auto; }
.ab-inputbar {
  display: flex; align-items: flex-end; gap: .5rem;
  background: rgba(255, 255, 255, .62); border: 1px solid var(--ab-edge); border-radius: 22px;
  padding: .5rem .5rem .5rem 1.2rem;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 14px 34px -22px rgba(14, 21, 38, .35);
  transition: border-color .15s, box-shadow .15s;
}
.ab-inputbar:focus-within { border-color: rgba(14, 21, 38, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 0 0 4px rgba(14, 21, 38, .06); }
.ab-textarea {
  flex: 1 1 auto; border: 0; background: transparent; color: var(--ab-ink); font: inherit; font-size: 1rem;
  resize: none; outline: none; max-height: 150px; line-height: 1.5; padding: .6rem 0;
}
.ab-textarea::placeholder { color: #929aa8; }
.ab-send {
  flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--ab-ink); color: #fff; display: grid; place-items: center;
  transition: background .15s, transform .12s, opacity .15s;
}
.ab-send:hover:not(:disabled) { background: #1c2740; }
.ab-send:active:not(:disabled) { transform: scale(.9); }
.ab-send:disabled { background: rgba(14, 21, 38, .16); color: rgba(255, 255, 255, .85); cursor: default; }
.ab-send svg { width: 20px; height: 20px; }

.ab-footnote { text-align: center; font-size: .77rem; color: #8b93a0; margin-top: .75rem; }
.ab-footnote a { color: var(--ab-red-2); text-decoration: none; font-weight: 600; }

/* lock the page behind the modal */
body.ab-lock { overflow: hidden; }

/* ---- Floating "Consult AgentBiz" trigger (self-contained so it styles the
   notch wherever this widget loads, incl. WordPress) ---------------------- */
.agentbiz-notch { position: fixed; left: 50%; bottom: 1.15rem; transform: translateX(-50%); z-index: 990; border: 0; background: transparent; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.agentbiz-notch .an-body { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .42rem; background: rgba(12, 19, 33, .5); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: .34rem .8rem; color: #fff; box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .55); transition: transform .22s cubic-bezier(.2, .8, .2, 1), padding .22s ease, box-shadow .22s ease; }
.agentbiz-notch:hover .an-body { transform: translateY(-4px) scale(1.04); padding: .4rem .95rem; box-shadow: 0 20px 42px -16px rgba(0, 0, 0, .6); }
.agentbiz-notch .an-shine { position: absolute; inset: 0; z-index: 0; background: radial-gradient(75% 170% at 50% 62%, rgba(56, 132, 255, .55), rgba(56, 132, 255, 0) 70%); opacity: .5; animation: an-pulse 3s ease-in-out infinite; pointer-events: none; }
.agentbiz-notch:hover .an-shine { opacity: .9; }
.agentbiz-notch .an-ic { position: relative; z-index: 1; display: inline-flex; align-items: center; color: #dbe9ff; flex: none; line-height: 0; }
.agentbiz-notch .an-ic svg { width: 17px; height: 17px; display: block; }
.agentbiz-notch .an-text { position: relative; z-index: 1; font-size: .85rem; font-weight: 500; line-height: 1; white-space: nowrap; }
.agentbiz-notch .an-text b { font-weight: 600; }
.agentbiz-notch .an-verb { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .2s ease, opacity .18s ease; }
.agentbiz-notch:hover .an-verb { max-width: 6em; opacity: 1; }
@keyframes an-pulse { 0%, 100% { opacity: .38; } 50% { opacity: .62; } }
@media (prefers-reduced-motion: reduce) { .agentbiz-notch .an-shine { animation: none; } .agentbiz-notch .an-body { transition: none; } }
@media (max-width: 560px) { .agentbiz-notch { bottom: 1rem; } }

/* buttons reused inside cards */
.ab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 14px; padding: .85rem 1.4rem; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: filter .15s, background .15s, transform .1s, opacity .15s;
}
.ab-btn-primary { background: var(--ab-ink); color: #fff; }
.ab-btn-primary:hover { background: #1c2740; }
.ab-btn-primary:disabled { opacity: .55; cursor: default; }
.ab-btn-wa { background: #16a34a; color: #fff; }
.ab-btn-wa:hover { filter: brightness(1.05); }
.ab-btn-wa svg { width: 17px; height: 17px; }
