/* ════════════════════════════════════════════════════════════════
   BB-01 CHATBOT  +  GET-A-QUOTE FORM
   ════════════════════════════════════════════════════════════════ */

/* ---------- launcher ---------- */
.bot { position: fixed; right: 24px; bottom: 24px; z-index: 550; font-family: var(--f-body); }
.bot-fab {
  position: relative; width: 66px; height: 66px; display: grid; place-items: center;
  background: #0b0d14; border-radius: 50%;
  box-shadow: 0 12px 40px -10px rgba(var(--acc-rgb), .7), inset 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.bot-fab img { width: 34px; height: 34px; position: relative; z-index: 1; transition: transform .3s; }
.bot-fab:hover { transform: translateY(-4px) scale(1.04); }
.bot-fab:hover img { transform: rotate(-10deg); }
.bot-fab-ring {
  position: absolute; inset: -3px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, var(--acc), var(--acc2), var(--hot), var(--acc));
  -webkit-mask: radial-gradient(circle, transparent 30px, #000 31px);
          mask: radial-gradient(circle, transparent 30px, #000 31px);
  animation: botSpin 4s linear infinite;
}
.bot-fab::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(var(--acc-rgb), .5); animation: botPing 2.4s ease-out infinite;
}
.bot.open .bot-fab::after { display: none; }
.bot-fab-badge {
  position: absolute; top: -2px; right: -2px; z-index: 2; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 11px;
  background: var(--hot); color: #fff; font: 700 12px/1 var(--f-mono); box-shadow: 0 0 0 3px var(--bg);
}
@keyframes botSpin { to { transform: rotate(360deg); } }
@keyframes botPing { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }

.bot-teaser {
  position: absolute; right: 80px; bottom: 14px; white-space: nowrap; cursor: pointer;
  padding: 11px 16px; background: var(--panel); color: var(--text-dim); font-size: 14px;
  border: 1px solid rgba(var(--acc-rgb), .45);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  clip-path: polygon(0 0, 100% 0, 100% 35%, calc(100% + 0px) 50%, 100% 65%, 100% 100%, 0 100%);
  animation: teaserIn .5s cubic-bezier(.3,1.5,.5,1);
}
.bot-teaser b { color: var(--acc); margin-right: 4px; }
.bot-teaser[hidden] { display: none; }
@keyframes teaserIn { from { opacity: 0; transform: translateX(14px); } }

/* ---------- panel ---------- */
.bot-panel {
  position: absolute; right: 0; bottom: 84px;
  width: min(390px, calc(100vw - 28px)); height: min(600px, calc(100svh - 120px));
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(var(--acc2-rgb), .18), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(var(--acc-rgb), .10), transparent 60%),
    #0b0d14;
  border-radius: 18px;
  box-shadow: 0 40px 90px -25px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.07);
  transform-origin: bottom right;
  animation: botIn .32s cubic-bezier(.2,1.2,.4,1);
}
.bot-panel::before { /* animated gradient border */
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(140deg, var(--acc), transparent 35%, transparent 65%, var(--acc2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.bot-panel::after { /* scanlines */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
.bot-panel[hidden] { display: none; }
@keyframes botIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }

.bot-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.bot-ava {
  position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: rgba(var(--acc-rgb), .1); border-radius: 12px; border: 1px solid rgba(var(--acc-rgb), .35);
}
.bot-ava img { width: 28px; height: 28px; animation: avaBob 3s ease-in-out infinite; }
@keyframes avaBob { 50% { transform: translateY(-2px) rotate(-4deg); } }
.bot-id b { display: block; font: 700 17px/1.1 var(--f-display); letter-spacing: .1em; color: #fff; }
.bot-id b span { font-size: 11px; padding: 2px 6px; margin-left: 4px; vertical-align: 2px; background: var(--acc); color: #07080d; letter-spacing: .14em; }
.bot-id small { display: flex; align-items: center; gap: 7px; margin-top: 4px; font: 500 11.5px var(--f-mono); color: #8b91a8; }
.bot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 rgba(var(--acc-rgb), .7); animation: ping 1.6s infinite; }
.bot-x { margin-left: auto; width: 36px; height: 36px; display: grid; place-items: center; color: #8b91a8; border-radius: 10px; background: rgba(255,255,255,.04); transition: all .2s; }
.bot-x:hover { color: #fff; background: rgba(255,255,255,.1); }

.bot-log { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.bot-log::-webkit-scrollbar { width: 4px; }
.bot-row { display: flex; gap: 8px; align-items: flex-end; animation: msgIn .28s ease; }
.bot-row.from-me { justify-content: flex-end; }
.bot-mini { width: 24px; height: 24px; flex: none; margin-bottom: 2px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.bot-msg { max-width: 82%; padding: 11px 14px; font-size: 14.5px; line-height: 1.55; color: #e6e9f2; word-wrap: break-word; }
.bot-row.from-bot .bot-msg { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.07); border-radius: 4px 16px 16px 16px; }
.bot-row.from-me .bot-msg { background: linear-gradient(135deg, var(--acc), #9be22a); color: #07080d; font-weight: 600; border-radius: 16px 16px 4px 16px; }
.bot-row.wide .bot-msg { max-width: 100%; }
.bot-msg a { color: var(--acc); font-weight: 600; text-decoration: none; border-bottom: 1px dashed currentColor; }
.bot-msg i { font-style: italic; color: #8b91a8; }
.bot-dots { display: inline-flex; gap: 4px; }
.bot-dots i { width: 7px; height: 7px; background: var(--acc); border-radius: 2px; animation: botDot 1s infinite; }
.bot-dots i:nth-child(2) { animation-delay: .15s; background: var(--acc2); }
.bot-dots i:nth-child(3) { animation-delay: .3s; background: var(--hot); }
@keyframes botDot { 50% { opacity: .25; transform: translateY(-4px); } }

.bot-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.bot-tiles button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 10px; text-align: left;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; transition: all .2s;
}
.bot-tiles button:hover { border-color: var(--acc); transform: translateY(-2px); background: rgba(var(--acc-rgb), .08); }
.bot-tiles i { font-size: 17px; color: var(--acc); margin-bottom: 4px; }
.bot-tiles button:nth-child(2) i { color: var(--acc2); }
.bot-tiles button:nth-child(3) i { color: var(--gold); }
.bot-tiles b { font: 700 13px/1.15 var(--f-display); text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.bot-tiles span { font-size: 11px; color: #8b91a8; line-height: 1.3; }

.bot-card { margin: 10px 0; padding: 12px; background: rgba(0,0,0,.35); border: 1px dashed rgba(var(--acc-rgb), .4); border-radius: 10px; font-size: 13.5px; }
.bot-card div { display: flex; gap: 10px; padding: 2px 0; }
.bot-card span { width: 52px; flex: none; font: 600 10.5px/1.9 var(--f-mono); letter-spacing: .12em; color: var(--acc); }
.bot-card p { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); color: #c9cdda; }

.bot-chips { position: relative; z-index: 1; display: flex; gap: 6px; padding: 6px 14px 12px; overflow-x: auto; scrollbar-width: none; }
.bot-chips::-webkit-scrollbar { display: none; }
.bot-chips:empty { display: none; }
.bot-chips button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 20px;
  font: 600 12.5px/1 var(--f-body); color: #dfe3ee; white-space: nowrap;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); transition: all .2s;
}
.bot-chips button i { color: var(--acc); }
.bot-chips button:first-child { background: rgba(var(--acc-rgb), .12); border-color: rgba(var(--acc-rgb), .5); color: var(--acc); }
.bot-chips button:hover { background: var(--acc); border-color: var(--acc); color: #07080d; }
.bot-chips button:hover i { color: #07080d; }

.bot-form { position: relative; z-index: 1; display: flex; gap: 8px; margin: 0 12px; padding: 6px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.bot-form:focus-within { border-color: rgba(var(--acc-rgb), .6); box-shadow: 0 0 0 4px rgba(var(--acc-rgb), .1); }
.bot-input { flex: 1; min-width: 0; padding: 9px 8px; background: transparent; border: 0; color: #fff; font: inherit; font-size: 16px; outline: none; }
.bot-input::placeholder { color: #6b7189; }
.bot-form button { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--acc); color: #07080d; font-size: 16px; transition: transform .15s, filter .15s; }
.bot-form button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.bot-foot { position: relative; z-index: 1; padding: 8px 14px 12px; text-align: center; font: 500 10.5px var(--f-mono); letter-spacing: .06em; color: #4f566e; }

/* ══════════════ GET A QUOTE FORM ══════════════ */
.quote {
  position: relative; margin-top: clamp(28px, 4vw, 44px); padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(160deg, rgba(var(--acc-rgb), .07), transparent 40%), var(--panel);
  border: 1px solid var(--line-strong);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.quote.sent { animation: questDone .9s ease; }
@keyframes questDone { 30% { box-shadow: inset 0 0 0 2px var(--acc), 0 0 60px rgba(var(--acc-rgb), .4); } }
.quote-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.quote-note { margin: 0; font: 500 13px var(--f-mono); color: var(--text-dim); }
.quote-note i { color: var(--acc); margin-right: 6px; }

.q-types { border: 0; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.q-types legend, .q-field > span { display: block; margin-bottom: 10px; font: 600 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.q-types legend b, .q-field b { color: var(--hot); }
.q-field em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--text-mute); margin-left: 6px; }
.q-types label { position: relative; }
.q-types input { position: absolute; opacity: 0; pointer-events: none; }
.q-types span {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 16px;
  font: 600 14px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
  background: var(--bg-2); border: 1px solid var(--line-strong); cursor: pointer; transition: all .18s;
}
.q-types span i { color: var(--acc); }
.q-types label:hover span { color: var(--text); border-color: var(--text-dim); }
.q-types input:checked + span { background: var(--acc); border-color: var(--acc); color: #07080d; box-shadow: 0 8px 24px -10px rgba(var(--acc-rgb), .8); }
.q-types input:checked + span i { color: #07080d; }
.q-types input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 3px; }

.q-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.q-wide { grid-column: 1 / -1; }
.q-field input, .q-field textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-strong); outline: none; border-radius: 0;
  transition: border-color .2s, box-shadow .2s;
}
.q-field textarea { resize: vertical; min-height: 120px; }
.q-field input::placeholder, .q-field textarea::placeholder { color: var(--text-mute); }
.q-field input:focus, .q-field textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(var(--acc-rgb), .12); }
.invalid input, .invalid textarea, .q-types.invalid span { border-color: var(--hot) !important; }
.q-types.invalid legend, .q-field.invalid > span { color: var(--hot); }
.q-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.q-foot { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.q-status { margin: 0; flex: 1; min-width: 220px; font: 500 14px var(--f-mono); color: var(--text-dim); }
.q-status.ok { color: var(--acc); }
.q-status.err { color: var(--hot); }
.q-foot .btn:disabled { opacity: .7; cursor: wait; }

@media (max-width: 760px) {
  .q-grid { grid-template-columns: 1fr; }
  .q-types span { padding: 10px 12px; font-size: 12.5px; }
}
@media (max-width: 640px) {
  .bot { right: 14px; bottom: 14px; }
  .bot-fab { width: 58px; height: 58px; }
  .bot-fab-ring { -webkit-mask: radial-gradient(circle, transparent 26px, #000 27px); mask: radial-gradient(circle, transparent 26px, #000 27px); }
  .bot-panel { bottom: 74px; height: min(600px, calc(100svh - 100px)); }
  .bot-teaser { display: none; }
  .achv-toast { bottom: 88px; }
}
