/* ═══════════════════════════════════════════════════════════════════
   Zimmy · Beta — enterprise conversational commerce shell v3.11.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Root widget ──────────────────────────────────────────────────── */
.zb-ai-new-session-btn {
  margin-left: auto;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  color: #fff;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.zb-ai-new-session-btn:hover,
.zb-ai-new-session-btn:focus { background: rgba(255,255,255,.24); }
.zb-ai-new-session-btn:disabled { opacity: .55; cursor: wait; }
.zb-ai-assistant {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --zb-orange: #f58220;
  --zb-green: #075f3b;
  --zb-ink: #14251c;
  --zb-surface: #ffffff;
}

/* ── Toggle button ────────────────────────────────────────────────── */
.zb-ai-toggle {
  border: 0;
  border-radius: 999px;
  background: var(--zb-brand, #2e7d32);
  color: #fff;
  padding: 7px 14px 7px 7px;
  box-shadow: 0 14px 34px rgba(7,95,59,.27), 0 4px 12px rgba(0,0,0,.14);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.zb-ai-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.zb-ai-toggle-avatar {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff4e9;
  border: 2px solid rgba(255,255,255,.9);
}

/* ── Panel ────────────────────────────────────────────────────────── */
.zb-ai-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 62px;
  width: 400px;
  max-width: calc(100vw - 28px);
  height: 640px;
  max-height: calc(100vh - 100px);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(7,45,29,.24), 0 6px 22px rgba(0,0,0,.12);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  flex-direction: column;
}
.zb-ai-panel.open {
  display: flex;
  animation: zb-panel-in 0.2s ease;
}
@keyframes zb-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Header ───────────────────────────────────────────────────────── */
.zb-ai-header {
  background: linear-gradient(135deg, var(--zb-green), #084d35);
  color: #fff;
  padding: 14px 16px 13px;
  display: flex;
  gap: 11px;
  align-items: center;
  flex-shrink: 0;
}
.zb-ai-header-avatar {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff4e9;
  border: 2px solid rgba(255,255,255,.88);
  flex: 0 0 auto;
}
.zb-ai-header-info { min-width: 0; }
.zb-ai-header-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.zb-ai-beta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--zb-orange);
  color: #1d251f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.zb-ai-header-info small {
  display: block;
  opacity: 0.85;
  font-size: 11px;
  margin-top: 1px;
}
.zb-ai-beta-notice {
  padding: 8px 14px;
  background: #fff8ee;
  color: #5a3a16;
  border-bottom: 1px solid #f3dcc1;
  font-size: 11px;
  line-height: 1.35;
}
.zb-ai-connection-status {
  padding: 8px 14px;
  background: #edf7ff;
  color: #174b70;
  border-bottom: 1px solid #cfe3f1;
  font-size: 11px;
  font-weight: 700;
}
.zb-ai-connection-status[hidden] { display: none; }

/* Online status dot with pulse animation */
.zb-ai-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #69f0ae;
  flex-shrink: 0;
  animation: zb-pulse 2.4s infinite;
}
@keyframes zb-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(105,240,174,.55); }
  50%       { box-shadow: 0 0 0 5px rgba(105,240,174,0);   }
}

.zb-ai-close-btn {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.85;
}
.zb-ai-close-btn:hover { opacity: 1; background: rgba(255,255,255,.15); }

/* ── Messages area ────────────────────────────────────────────────── */
.zb-ai-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 8px;
  background: linear-gradient(180deg, #f7faf8 0%, #f2f7f4 100%);
  scroll-behavior: smooth;
}

/* ── Message bubbles ──────────────────────────────────────────────── */
.zb-ai-msg {
  padding: 10px 13px;
  border-radius: 16px;
  margin: 7px 0;
  line-height: 1.45;
  font-size: 13.5px;
  word-break: break-word;
}
.zb-ai-msg.bot {
  background: #fff;
  border: 1px solid #e2e9e4;
  color: #1d2e22;
  border-bottom-left-radius: 4px;
  max-width: calc(92% - 32px);
  margin-left: 32px;
  position: relative;
  box-shadow: 0 2px 8px rgba(17,53,35,.05);
}
.zb-ai-msg.bot::before {
  content: "";
  position: absolute;
  left: -34px;
  bottom: 0;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff4e9 url("../img/zimmy-avatar-64.webp") center/contain no-repeat;
  border: 1px solid #e6d5c1;
}
.zb-ai-msg.user {
  background: var(--zb-brand, #2e7d32);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
  max-width: 85%;
  text-align: right;
}
.zb-ai-msg.zb-ai-history { opacity: 0.72; }

/* Inline links inside bot messages */
.zb-ai-link {
  display: inline-block;
  color: var(--zb-brand, #2e7d32);
  background: #eef8ef;
  border: 1px solid #cfe7d1;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 1px 0;
  font-size: 0.86em;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.zb-ai-link:hover { text-decoration: underline; background: #e4f3e5; }

/* ── Typing indicator ─────────────────────────────────────────────── */
.zb-ai-typing {
  display: flex !important;
  align-items: center;
  gap: 5px;
  padding: 14px 16px !important;
  min-width: 54px;
}
.zb-ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--zb-brand, #2e7d32);
  opacity: 0.35;
  animation: zb-bounce 1.2s infinite ease-in-out;
}
.zb-ai-typing span:nth-child(1) { animation-delay: 0s;   }
.zb-ai-typing span:nth-child(2) { animation-delay: 0.18s; }
.zb-ai-typing span:nth-child(3) { animation-delay: 0.36s; }
.zb-ai-typing em { margin-left: 4px; color: #506258; font-size: 11px; font-style: normal; }
@keyframes zb-bounce {
  0%, 80%, 100% { transform: scale(0.55); opacity: 0.3; }
  40%           { transform: scale(1);    opacity: 1;   }
}

/* ── Quick-reply buttons ──────────────────────────────────────────── */
.zb-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0;
}
.zb-ai-actions button {
  border: 1px solid #c5dbc9;
  background: #fff;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 13px;
  cursor: pointer;
  font-size: 12px;
  color: #1d2e22;
  transition: background 0.12s;
}
.zb-ai-actions button:focus-visible,
.zb-ai-toggle:focus-visible,
.zb-ai-close-btn:focus-visible,
.zb-ai-new-session-btn:focus-visible,
.zb-ai-send-btn:focus-visible,
.zb-ai-card-add:focus-visible {
  outline: 3px solid #ffb45e;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .zb-ai-panel.open, .zb-ai-status-dot, .zb-ai-typing span { animation: none !important; }
  .zb-ai-messages { scroll-behavior: auto; }
  .zb-ai-toggle { transition: none; }
}
.zb-ai-actions button:hover { background: #ecf8ee; border-color: #a8cfad; }

/* ── Product cards ────────────────────────────────────────────────── */
.zb-ai-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 6px 0 4px;
}
.zb-ai-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #d6eadb;
  border-radius: 12px;
  padding: 9px 11px;
  cursor: pointer;
  transition: background 0.13s, box-shadow 0.13s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.zb-ai-card:hover { background: #f0faf2; box-shadow: 0 2px 8px rgba(0,0,0,.09); }
.zb-ai-card.zb-ai-card-oos { border-color: #f0d9a0; background: #fffbf0; }

/* Product thumbnail */
.zb-ai-card-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f0f4f0;
}

/* Number badge */
.zb-ai-card-num {
  color: #aaa;
  font-size: 11px;
  font-weight: 700;
  min-width: 16px;
  flex-shrink: 0;
}

/* Name + price column */
.zb-ai-card-info { flex: 1; min-width: 130px; }
.zb-ai-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #1d2e22;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
  word-break: break-word;
}
.zb-ai-card-price { font-size: 12px; color: #555; margin-top: 2px; }
.zb-ai-card-trust {
  margin-top: 5px;
  color: #17613d;
  font-size: 10px;
  font-weight: 750;
}
.zb-ai-card-trust::before { content: "✓ "; color: #1d8a55; }

.zb-ai-review-card {
  margin: 10px 0 10px 32px;
  padding: 13px;
  border: 1px solid #cfe3d7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15,72,44,.08);
}
.zb-ai-review-title { color: var(--zb-ink); font-weight: 800; margin-bottom: 8px; }
.zb-ai-review-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #edf2ef;
  color: #31453a;
  font-size: 12px;
}
.zb-ai-review-total { margin-top: 9px; font-weight: 800; color: var(--zb-ink); }
.zb-ai-review-safety {
  margin-top: 9px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #fff7e8;
  color: #684214;
  font-size: 11px;
  font-weight: 700;
}

/* View link */
.zb-ai-card-link {
  color: var(--zb-brand, #2e7d32);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.zb-ai-card-link:hover { text-decoration: underline; }

/* Add button */
.zb-ai-card-add {
  border: 1.5px solid var(--zb-brand, #2e7d32);
  background: transparent;
  color: var(--zb-brand, #2e7d32);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.zb-ai-card-add:hover:not(:disabled) {
  background: var(--zb-brand, #2e7d32);
  color: #fff;
}
.zb-ai-card-added {
  background: #e8f5e9 !important;
  border-color: #a5d6a7 !important;
  color: #388e3c !important;
  cursor: default;
}

/* ── Basket bar ───────────────────────────────────────────────────── */
.zb-ai-basket-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #e8f5e9;
  border-top: 1px solid #c8e6c9;
  font-size: 13px;
  flex-shrink: 0;
}
.zb-ai-basket-icon { font-size: 16px; }
.zb-ai-basket-count { flex: 1; font-weight: 600; color: #2e7d32; }
.zb-ai-basket-review-btn {
  border: 0;
  background: var(--zb-brand, #2e7d32);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.zb-ai-basket-review-btn:hover { opacity: 0.88; }

/* ── Input form ───────────────────────────────────────────────────── */
.zb-ai-form {
  display: flex;
  align-items: center;
  border-top: 1px solid #e4ebe6;
  padding: 9px 10px;
  background: #fff;
  gap: 8px;
  flex-shrink: 0;
}
.zb-ai-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.zb-ai-form input {
  flex: 1;
  border: 1px solid #c8d8cc;
  border-radius: 999px;
  padding: 10px 13px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
  background: #f9fdf9;
  width: 100%;
}
.zb-ai-form input:focus { border-color: var(--zb-brand, #2e7d32); background: #fff; }
.zb-ai-char-count {
  position: absolute;
  right: 12px;
  font-size: 10px;
  color: #aaa;
  pointer-events: none;
  white-space: nowrap;
}
.zb-ai-send-btn {
  border: 0;
  background: var(--zb-brand, #2e7d32);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.12s;
}
.zb-ai-send-btn:hover { opacity: 0.88; }
.zb-ai-send-btn:disabled { opacity: .62; cursor: wait; }

/* ── Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .zb-ai-assistant { right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); }
  .zb-ai-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .zb-ai-toggle-label { display: none; }
  .zb-ai-toggle { padding: 6px; border-radius: 50%; }
  .zb-ai-card-name { font-size: 12px; }
}
.zb-ai-close-btn,.zb-ai-new-session-btn,.zb-ai-send-btn,.zb-ai-card-add,.zb-ai-basket-review-btn { min-height: 44px; }


/* Category browse card */
.zb-ai-category-card {
  margin-top: 6px;
}
.zb-ai-category-card .zb-ai-card-link {
  border: 1.5px solid var(--zb-brand, #2e7d32);
  border-radius: 999px;
  padding: 5px 10px;
}


/* v3.8.7: keep product cards readable on narrow chat panels */
@media (max-width: 420px) {
  .zb-ai-card { align-items: flex-start; gap: 7px; }
  .zb-ai-card-info { min-width: 115px; }
  .zb-ai-card-link, .zb-ai-card-add { margin-top: 2px; }
}

/* v3.8.16: supports configurable quick buttons from back office. */

/* v3.8.17B — Agent handoff & WhatsApp continuation */
#zb-ai-assistant .zb-ai-handoff-card{border-color:#cfe8d4;background:#f7fff8}
#zb-ai-assistant .zb-ai-whatsapp-link{background:#1f9d55;color:#fff!important;border-color:#1f9d55}
#zb-ai-assistant .zb-ai-whatsapp-link:hover{filter:brightness(.95)}

/* v3.8.17B.1 back-office live chat */
#zb-ai-assistant .zb-ai-msg.agent{border-left:3px solid #2e7d32;background:#f1fbf3;}
#zb-ai-assistant .zb-ai-msg.agent:before{content:'Zimbuyer agent';display:block;font-size:11px;font-weight:700;color:#2e7d32;margin-bottom:3px;text-transform:uppercase;letter-spacing:.03em;}

/* v3.8.17B.3 live chat ops */
.zb-live-stats{margin-bottom:14px}.zb-live-stat{display:block;text-decoration:none!important;min-height:78px}.zb-live-stat span{display:block;color:#5f6f63}.zb-live-stat strong{font-size:26px}.zb-live-stat.active{outline:2px solid #2f7d32;background:#f1fbf2}.zb-live-list .badge{background:#d9534f}.zb-chat-agent{box-shadow:0 1px 2px rgba(0,0,0,.04)}

/* v3.8.17C.1: Admin Priority Work Stack uses inline back-office styles in aichatbot.php. */


/* v3.8.17C.2 — customer-side live chat status + admin quick replies */
#zb-ai-assistant .zb-ai-live-status{display:flex;align-items:center;gap:7px;padding:8px 13px;background:#f0fbf3;border-bottom:1px solid #d5ead9;color:#245b2a;font-size:12px;font-weight:700;}
#zb-ai-assistant .zb-ai-live-dot{width:8px;height:8px;border-radius:50%;background:#2e7d32;box-shadow:0 0 0 3px rgba(46,125,50,.12);display:inline-block;flex:0 0 auto;}
#zb-ai-assistant .zb-ai-system-notice{font-size:12px;background:#fff8e1;border-left:3px solid #f0b429;color:#6b4e00;}
.zb-agent-template-row{margin:10px 0 8px;padding:8px 10px;background:#f7faf7;border:1px solid #dfeee2;border-radius:10px;}
.zb-agent-template-row .zb-agent-template{margin:2px 2px 2px 0;white-space:normal;text-align:left;}
.zb-agent-reply-box{border-radius:10px!important;}

/* v3.8.17C.4 — follow-up capture card for offline/busy handoff */
.zb-ai-followup-card {
  padding: 12px;
  border: 1px solid rgba(47, 123, 40, .18);
  background: #ffffff;
}
.zb-ai-followup-card strong {
  display: block;
  color: #2f7b28;
  margin-bottom: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
}
.zb-ai-followup-card p {
  margin: 0 0 8px 0;
  color: #555;
  font-size: 13px;
  line-height: 1.35;
}
.zb-ai-followup-input {
  width: 100%;
  box-sizing: border-box;
  margin: 5px 0;
  padding: 9px 10px;
  border: 1px solid #d8e2d6;
  border-radius: 8px;
  background: #fbfdfb;
  color: #333;
  font-size: 13px;
}
.zb-ai-followup-input:focus {
  outline: none;
  border-color: #2f7b28;
  box-shadow: 0 0 0 2px rgba(47, 123, 40, .10);
}

/* v3.8.17C.4 — back-office incoming request visibility */
.zb-incoming-request-alert {
  border-left: 5px solid #f0ad4e;
  font-size: 14px;
}
.zb-live-list .list-group-item strong {
  letter-spacing: .01em;
}
.zb-live-meta {
  background: #f8faf8;
  border: 1px solid #e0ebe0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  line-height: 1.6;
}

/* v3.8.17C.12 */
.zb-ai-checkout-card{border-color:#2e7d32}

/* v3.8.17C.15: cache-busted stylesheet for conversational workflow fix. */

/* v3.8.17C.19: asset version for Production Search, Match Validation & Commerce Safety. */

/* v3.8.17C.21: button event bridge release marker. */


/* v3.8.17C.25 scoped quick-button reliability guard */
#zb-ai-assistant, #zb-ai-assistant * { box-sizing: border-box; }
#zb-ai-assistant .zb-ai-panel { isolation: isolate; }
#zb-ai-assistant .zb-ai-messages { position: relative; z-index: 1; }
#zb-ai-assistant .zb-ai-actions { position: relative; z-index: 3; pointer-events: auto; }
#zb-ai-assistant .zb-ai-actions button,
#zb-ai-assistant .zb-ai-quick-action { pointer-events: auto; touch-action: manipulation; }

/* v3.8.17C.29: quick buttons are handled by a root-scoped global bridge. */
#zb-ai-assistant .zb-ai-actions, .zb-ai-assistant .zb-ai-quick-action { pointer-events: auto !important; }
#zb-ai-assistant .zb-ai-actions button { pointer-events: auto !important; }

/* v3.8.17C.29 — customer chatbox UX refresh for guided commerce flow */
#zb-ai-assistant .zb-ai-panel{
  width: min(430px, calc(100vw - 22px));
  max-height: min(720px, calc(100vh - 34px));
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(21, 46, 27, .25);
  border: 1px solid rgba(39, 117, 48, .18);
  background: #f7fbf7;
}
#zb-ai-assistant .zb-ai-header{
  min-height: 58px;
  background: linear-gradient(135deg, var(--zb-brand,#2e7d32), #236b2b);
  padding: 12px 16px;
}
#zb-ai-assistant .zb-ai-header-name strong{letter-spacing:.06em;font-weight:800;}
#zb-ai-assistant .zb-ai-messages{
  padding: 16px 14px 14px;
  background: linear-gradient(180deg,#f8fcf8 0,#f1f8f2 100%);
  gap: 10px;
}
#zb-ai-assistant .zb-ai-msg{
  border-radius: 16px;
  line-height: 1.45;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(17,45,24,.04);
}
#zb-ai-assistant .zb-ai-msg.bot{
  border: 1px solid #e1ece3;
  background: #fff;
}
#zb-ai-assistant .zb-ai-msg.user{
  background: var(--zb-brand,#2e7d32);
  color:#fff;
  border: 1px solid rgba(0,0,0,.02);
}
#zb-ai-assistant .zb-ai-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin: 6px 0 2px;
}
#zb-ai-assistant .zb-ai-actions button,
#zb-ai-assistant .zb-ai-quick-action{
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid #cfe0d2;
  background: #fff;
  color: #25452c;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 1px 4px rgba(25,72,33,.05);
}
#zb-ai-assistant .zb-ai-actions button:hover,
#zb-ai-assistant .zb-ai-quick-action:hover{
  border-color: var(--zb-brand,#2e7d32);
  background: #edf8ef;
}
#zb-ai-assistant .zb-ai-form{
  background:#fff;
  border-top: 1px solid #dce8de;
  padding: 11px 13px;
  gap:8px;
}
#zb-ai-assistant .zb-ai-input-wrap input,
#zb-ai-assistant #zb-ai-input{
  min-height: 42px;
  border-radius: 999px;
  border-color:#c9ddcd;
  padding-left:15px;
  font-size:14px;
}
#zb-ai-assistant .zb-ai-send-btn{
  min-height:42px;
  border-radius:999px;
  padding:0 18px;
  font-weight:800;
}
#zb-ai-assistant .zb-ai-card{
  border-radius: 16px;
  border-color:#dbe9de;
  box-shadow: 0 6px 18px rgba(22,64,36,.07);
}
#zb-ai-assistant .zb-ai-checkout-card{
  border: 1.5px solid var(--zb-brand,#2e7d32);
  background:#fbfffb;
}
#zb-ai-assistant .zb-ai-basket-bar{
  border-top: 1px solid #dbe8de;
  background:#ecf7ee;
  padding:10px 13px;
}

/* v3.12.0 professional service-concierge entry experience */
#zb-ai-assistant .zb-ai-concierge-intro{
  margin:8px 2px 10px;
  color:#425549;
  font-size:12px;
  font-weight:500;
  line-height:1.45;
}
#zb-ai-assistant .zb-ai-concierge-intro strong{display:block;margin-bottom:2px;color:#183923;font-size:13px;}
#zb-ai-assistant .zb-ai-service-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:0 0 9px;
}
#zb-ai-assistant .zb-ai-service-grid[hidden],
#zb-ai-assistant .zb-ai-concierge-intro[hidden],
#zb-ai-assistant .zb-ai-trust-note[hidden]{display:none!important;}
#zb-ai-assistant .zb-ai-service-card{
  appearance:none;
  display:flex;
  align-items:flex-start;
  gap:9px;
  min-width:0;
  min-height:72px;
  padding:10px;
  border:1px solid #d9e6dc;
  border-radius:13px;
  background:#fff;
  color:#183923;
  text-align:left;
  cursor:pointer;
  box-shadow:0 3px 10px rgba(25,66,38,.05);
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
#zb-ai-assistant .zb-ai-service-card:hover{
  border-color:var(--zb-brand,#2e7d32);
  box-shadow:0 7px 18px rgba(25,66,38,.11);
  transform:translateY(-1px);
}
#zb-ai-assistant .zb-ai-service-card:focus-visible{
  outline:3px solid rgba(46,125,50,.24);
  outline-offset:2px;
}
#zb-ai-assistant .zb-ai-service-card-wide{grid-column:1/-1;min-height:60px;}
#zb-ai-assistant .zb-ai-service-card-primary{
  grid-column:1/-1;
  border-color:#f58220;
  background:linear-gradient(135deg,#fff8f1 0%,#ffffff 100%);
  min-height:76px;
}
#zb-ai-assistant .zb-ai-question-invitation{
  cursor:default;
}
#zb-ai-assistant .zb-ai-question-invitation:hover{
  transform:none;
  box-shadow:none;
}
#zb-ai-assistant .zb-ai-service-card-primary .zb-ai-service-icon{
  background:#f58220;
  color:#fff;
}
#zb-ai-assistant .zb-ai-service-card em{
  display:inline-block;
  margin-top:5px;
  color:#35634a;
  font-size:10.5px;
  font-style:normal;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
}
#zb-ai-assistant .zb-ai-service-icon{
  flex:0 0 30px;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#eef7f0;
  font-size:17px;
}
#zb-ai-assistant .zb-ai-service-card strong{
  display:block;
  margin:1px 0 3px;
  font-size:12px;
  line-height:1.25;
}
#zb-ai-assistant .zb-ai-service-card small{
  display:block;
  color:#607166;
  font-size:10px;
  line-height:1.35;
}
#zb-ai-assistant .zb-ai-trust-note{
  display:flex;
  gap:6px;
  align-items:flex-start;
  margin:8px 2px 2px;
  padding:8px 10px;
  border-radius:10px;
  background:#eff7f0;
  color:#355640;
  font-size:10px;
  line-height:1.4;
}
#zb-ai-assistant .zb-ai-trust-note span{color:var(--zb-brand,#2e7d32);font-weight:900;}
@media (max-width:380px){
  #zb-ai-assistant .zb-ai-service-grid{grid-template-columns:1fr;}
  #zb-ai-assistant .zb-ai-service-card-wide{grid-column:auto;}
  #zb-ai-assistant .zb-ai-service-card-primary{grid-column:auto;}
  #zb-ai-assistant .zb-ai-service-card{min-height:60px;}
}
@media (max-width: 520px){
  #zb-ai-assistant .zb-ai-panel{width:calc(100vw - 16px); right:8px; bottom:78px; max-height:calc(100vh - 92px);}
  #zb-ai-assistant .zb-ai-actions button{font-size:12px;padding:7px 10px;}
}

/* v3.8.17C.30 Option B WhatsApp relay card */
.zb-ai-handoff-card{border-color:#2e7d32;background:#f7fff7}.zb-ai-handoff-card .zb-ai-whatsapp-link{display:inline-flex;align-items:center;justify-content:center;margin-top:8px;text-decoration:none}

/* v3.8.17C.31 controlled quick-button safety */
.zb-ai-actions { position: relative; z-index: 20; pointer-events: auto; }
.zb-ai-actions button, .zb-ai-quick-action { pointer-events: auto; cursor: pointer; }
.zb-ai-actions button[disabled], .zb-ai-quick-action[disabled] { opacity: .55; cursor: not-allowed; }

/* v3.8.17C.35 UI Navigation Sync */
.zb-channel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}
.zb-channel-card{background:#fff;border:1px solid #e4eee4;border-radius:16px;padding:22px;box-shadow:0 8px 22px rgba(31,80,45,.08)}
.zb-channel-card h4{font-size:18px;font-weight:800;color:#173b22;margin:4px 0 8px}.zb-channel-card p{color:#475b4b;line-height:1.55}
.zb-channel-icon{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#eaf6ea;font-size:22px;margin-bottom:10px}.zb-switch-row{display:flex;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #edf3ed;font-weight:600;color:#24412c}.zb-switch-row:first-of-type{border-top:0}.zb-select-row{display:block;margin:12px 0}.zb-select-row span{display:block;font-weight:700;color:#24412c;margin-bottom:6px}@media(max-width:900px){.zb-channel-grid{grid-template-columns:1fr}}

/* v3.8.17C.35 UI/navigation sync: Channel Workflow Rules has sidebar, dashboard, and QA reachability support. */

/* v3.8.17C.36 Website Contact Intake controls */
.zb-channel-card code{background:#eef6f0;border:1px solid #d5e8da;border-radius:6px;padding:2px 5px;color:#1d5f2b}

/* v3.13.4.0 visible, workflow-backed Zimmy invitation */
#zb-ai-assistant .zb-ai-invite{
  position:absolute;right:0;bottom:72px;width:310px;max-width:calc(100vw - 24px);
  padding:22px 20px 24px;border-radius:24px;background:linear-gradient(145deg,#10231a,#0a3825);
  color:#fff;box-shadow:0 24px 62px rgba(7,45,29,.32),0 8px 20px rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.12);opacity:0;visibility:hidden;
  transform:translateY(10px) scale(.98);transition:opacity .2s ease,transform .2s ease,visibility .2s;
  text-align:left;pointer-events:none;
}
#zb-ai-assistant .zb-ai-invite.visible{opacity:1;visibility:visible;transform:none;pointer-events:auto;}
#zb-ai-assistant .zb-ai-invite-kicker{display:block;margin:0 30px 7px 0;color:#f6aa38;font-size:10px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;}
#zb-ai-assistant .zb-ai-invite-title{display:block;margin:0 30px 8px 0;color:#fff;font-size:22px;line-height:1.18;letter-spacing:-.025em;}
#zb-ai-assistant .zb-ai-invite p{margin:0 0 16px;color:rgba(255,255,255,.82);font-size:13px;line-height:1.5;}
#zb-ai-assistant .zb-ai-invite-primary,#zb-ai-assistant .zb-ai-invite-whatsapp{
  width:100%;min-height:43px;display:flex;align-items:center;justify-content:center;border-radius:11px;
  padding:10px 14px;font-size:13px;font-weight:800;text-decoration:none;cursor:pointer;
}
#zb-ai-assistant .zb-ai-invite-primary{border:0;background:#f6aa38;color:#13231b;margin-bottom:9px;}
#zb-ai-assistant .zb-ai-invite-primary:hover{background:#ffba4f;}
#zb-ai-assistant .zb-ai-invite-whatsapp{border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.06);color:#fff;}
#zb-ai-assistant .zb-ai-invite-whatsapp:hover{background:rgba(255,255,255,.14);color:#fff;}
#zb-ai-assistant .zb-ai-invite-close{position:absolute;right:12px;top:10px;width:34px;height:34px;border:0;background:transparent;color:rgba(255,255,255,.8);font-size:22px;line-height:1;cursor:pointer;border-radius:50%;}
#zb-ai-assistant .zb-ai-invite-close:hover,#zb-ai-assistant .zb-ai-invite-close:focus-visible{background:rgba(255,255,255,.12);color:#fff;outline:none;}
#zb-ai-assistant .zb-ai-invite-avatar{position:absolute;right:-7px;bottom:-17px;width:52px;height:52px;object-fit:contain;border-radius:50%;background:#fff4e9;border:3px solid #fff;box-shadow:0 8px 20px rgba(0,0,0,.22);}
#zb-ai-assistant:has(.zb-ai-panel.open) .zb-ai-invite{opacity:0;visibility:hidden;pointer-events:none;}
@media(prefers-reduced-motion:reduce){#zb-ai-assistant .zb-ai-invite{transition:none;}}
@media(max-width:600px){
  #zb-ai-assistant .zb-ai-invite{position:fixed;right:10px;bottom:82px;width:min(310px,calc(100vw - 20px));padding:19px 18px 22px;border-radius:21px;}
  #zb-ai-assistant .zb-ai-invite-title{font-size:20px;}
  #zb-ai-assistant .zb-ai-invite-avatar{right:8px;bottom:-19px;}
}
