/*
 * ARY Price Negotiation — Premium AI Bargaining Chat Widget
 * Version: 3.0.0
 * ----------------------------------------------------------------
 * Design system tokens → component styles → animations → responsive
 * ----------------------------------------------------------------
 */

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
html:root {
  --asb-blue:        #001c62;
  --asb-blue-light:  #2d4683;
  --asb-blue-dark:   #00175c;
  --asb-gold:        #d5e3ff;
  --asb-gold-light:  #eaf1ff;
  --asb-green:       #2d5fa8;
  --asb-green-light: #e2eafa;
  --asb-ink:         #142e6e;
  --asb-muted:       #6b7ca8;
  --asb-line:        #c3d2f2;
  --asb-bg:          #f4f8ff;
  --asb-white:       #ffffff;
  --asb-radius-lg:   20px;
  --asb-radius-md:   14px;
  --asb-radius-sm:   10px;
  --asb-shadow-lg:   0 28px 80px rgba(0,23,92,.38), 0 0 0 1px rgba(0,28,98,.08);
  --asb-shadow-md:   0 10px 32px rgba(0,28,98,.22);
  --asb-shadow-sm:   0 4px 12px rgba(0,28,98,.14);
  --asb-transition:  .32s cubic-bezier(.16,.9,.24,1);
  --asb-font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --asb-fun-font:    "Trebuchet MS", "Arial Rounded MT Bold", "Segoe UI", Roboto, sans-serif;
}

/* ================================================================
   ICON RESET
   ================================================================ */
.asb-icon { width: 20px; height: 20px; flex: 0 0 auto; }

.asb-btn-wrap,
.asb-offer-popup,
.asb-chat-panel {
  font-family: var(--asb-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   FLOATING BUTTON
   ================================================================ */
.asb-btn-wrap {
  position: fixed;
  top: 50%;
  bottom: auto;
  right: 18px;
  transform: translateY(-50%);
  z-index: 8000;
  font-family: var(--asb-font);
  animation: asb-float 5s ease-in-out infinite;
}

/* Playful horizontal chat sticker — the label stays fully readable */
.asb-bargain-btn {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 154px;
  height: 94px;
  padding: 13px 14px 13px 13px;
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 26px 26px 26px 9px;
  /* background: linear-gradient(135deg, #00215f 0%, #001c62 48%, #2d4683 100%); */
  /* color: var(--asb-white); */
  cursor: pointer;
  /* box-shadow:
    0 14px 32px rgba(0,23,92,.3),
    0 4px 10px rgba(0,23,92,.2),
    inset 0 1px 0 rgba(255,255,255,.18); */
  transform: rotate(-3deg);
  transition: transform .25s cubic-bezier(.16,.9,.24,1), box-shadow .25s ease;
  animation: asb-btn-enter .55s cubic-bezier(.16,.9,.24,1) both;
}

/* Small speech-bubble tail */
.asb-bargain-btn::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -9px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-top: 11px solid #001b5c;
  transform: rotate(8deg);
  pointer-events: none;
}

.asb-bargain-btn:hover {
  /* transform: rotate(0deg) translateY(-3px) scale(1.04); */
  /* box-shadow:
    0 20px 42px rgba(0,23,92,.38),
    0 6px 14px rgba(0,23,92,.24),
    inset 0 1px 0 rgba(255,255,255,.22); */
}

.asb-bargain-btn:active { transform: rotate(-1deg) scale(.98); }

.asb-bargain-btn:focus-visible {
  outline: 2px solid var(--asb-white);
  outline-offset: 3px;
}

.asb-btn-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
  flex-shrink: 0;
  z-index: 2;
}

.asb-btn-icon .asb-icon {
  width: 22px;
  height: 22px;
  color: var(--asb-white);
}

.asb-btn-status {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3cc98b;
  border: 2px solid var(--asb-blue);
}

.asb-btn-label-wrap {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  height: auto;
  margin: 0;
  overflow: visible;
}

.asb-btn-label {
  display: block;
  writing-mode: horizontal-tb;
  text-orientation: initial;
  font-family: var(--asb-fun-font);
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: 0;
  color: var(--asb-white);
  text-shadow: 0 1px 2px rgba(0,12,46,.45);
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Playful rupee sticker */
.asb-btn-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--asb-white);
  background: #ffd34d;
  color: var(--asb-blue-dark);
  font-family: var(--asb-fun-font);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(10deg);
  box-shadow: 0 4px 10px rgba(0,23,92,.28);
}

/* Subtle single ring so the widget stays noticeable without looking synthetic */
.asb-btn-pulse {
  position: absolute;
  /* inset: -1px; */
  /* z-index: 1; */
  border-radius: 26px 26px 26px 9px;
  /* border: 1px solid rgba(213,227,255,.55); */
  opacity: 0;
  pointer-events: none;
  animation: asb-pulse 4.2s ease-out infinite;
}

.asb-btn-wrap.is-active .asb-btn-pulse { animation-duration: 2s; }

@keyframes asb-btn-enter {
  from { opacity: 0; transform: translateY(30px) scale(.9) rotate(-8deg); }
  to   { opacity: 1; transform: translateY(0) scale(1) rotate(-3deg); }
}
@keyframes asb-float {
  0%, 100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 8px)) rotate(1deg); }
}
@keyframes asb-pulse {
  0%      { opacity: .55; transform: scale(1); }
  70%,
  100%    { opacity: 0; transform: scale(1.16); }
}

/* Button hidden state (while chat panel is open) */
.asb-btn-wrap.is-hidden { display: none; }

/* ================================================================
   OVERLAY
   ================================================================ */
.asb-overlay {
  position: fixed;
  inset: 0;
  z-index: 8900;
  background: rgba(6,18,38,.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s ease;
}
.asb-overlay.is-visible { opacity: 1; }

/* ================================================================
   OFFER REVEAL POPUP
   ================================================================ */
.asb-offer-popup {
  position: fixed;
  top: 50%;
  right: 108px;
  z-index: 9000;
  width: 330px;
  max-width: calc(100vw - 130px);
  padding: 18px 18px 20px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 20px;
  background: linear-gradient(160deg, #eaf1ff 0%, #d5e3ff 60%, #c3d2f2 100%);
  box-shadow: 0 26px 70px rgba(0,23,92,.42), inset 0 1px 0 rgba(255,255,255,.7);
  color: var(--asb-ink);
  font-family: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(18px) scale(.92);
  transform-origin: 100% 50%;
  transition: opacity .3s ease, transform .34s cubic-bezier(.16,.9,.24,1), visibility .34s;
  overflow: hidden;
}

.asb-offer-popup::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.75), rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.asb-offer-popup.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) scale(1);
}

.asb-offer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,28,98,.08);
  color: var(--asb-blue-dark);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  z-index: 1;
}
.asb-offer-close:hover { background: rgba(0,28,98,.16); transform: rotate(90deg); }
.asb-offer-close .asb-icon { width: 15px; height: 15px; }

.asb-offer-badge {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--asb-blue-dark);
  color: var(--asb-white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.4;
}

.asb-offer-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px;
}

.asb-offer-img {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--asb-white);
  box-shadow: 0 6px 18px rgba(0,28,98,.18);
}
.asb-offer-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.asb-offer-info { min-width: 0; }

.asb-offer-name {
  display: block;
  font-size: 14.5px;
  font-weight: 900;
  color: var(--asb-blue-dark);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.asb-offer-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--asb-muted);
}

.asb-offer-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9);
}

.asb-offer-old {
  font-size: 13px;
  font-weight: 700;
  color: var(--asb-muted);
  text-decoration: line-through;
  text-decoration-color: #b32d2e;
}

.asb-offer-new {
  font-size: 23px;
  font-weight: 900;
  color: var(--asb-blue-dark);
  line-height: 1;
}

.asb-offer-save {
  flex-basis: 100%;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--asb-green);
}

.asb-start-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--asb-blue-dark), var(--asb-blue-light));
  color: var(--asb-white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,23,92,.34);
  transition: transform .22s ease, box-shadow .22s ease;
  overflow: hidden;
}

.asb-start-btn::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg);
  animation: asb-shimmer 3.4s ease-in-out infinite;
}

.asb-start-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(0,23,92,.44); }
.asb-start-btn:focus-visible { outline: 3px solid var(--asb-blue-light); outline-offset: 3px; }
.asb-start-btn .asb-icon { width: 17px; height: 17px; }

/* ================================================================
   CHAT PANEL
   ================================================================ */
.asb-chat-panel {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  width: 400px;
  max-width: calc(100vw - 28px);
  background: var(--asb-white);
  border-radius: var(--asb-radius-lg);
  box-shadow: var(--asb-shadow-lg);
  overflow: hidden;
  transform: translateX(calc(100% + 30px));
  visibility: hidden;
  transition: transform var(--asb-transition), visibility var(--asb-transition);
  font-family: inherit;
}

/* Top gradient accent stripe */
.asb-chat-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--asb-blue), var(--asb-gold), var(--asb-blue));
  z-index: 2;
}

.asb-chat-panel.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* ================================================================
   CHAT HEADER
   ================================================================ */
.asb-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  background: var(--asb-blue-dark);
  color: var(--asb-white);
  flex-shrink: 0;
}

.asb-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asb-bot-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--asb-blue-light), var(--asb-gold));
  flex-shrink: 0;
}
.asb-bot-avatar .asb-icon { width: 22px; height: 22px; color: var(--asb-blue-dark); }

.asb-bot-status {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22d060;
  border: 2px solid var(--asb-blue-dark);
  animation: asb-status-blink 2.5s ease-in-out infinite;
}
@keyframes asb-status-blink {
  0%, 100% { opacity: 1; } 50% { opacity: .55; }
}

.asb-chat-header-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
}

.asb-chat-header-status {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  opacity: .78;
  margin-top: 2px;
}

.asb-close-btn {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: transparent;
  color: var(--asb-white);
  cursor: pointer;
  transition: background .2s ease, transform .25s ease;
  flex-shrink: 0;
}
.asb-close-btn:hover { background: rgba(255,255,255,.15); transform: rotate(90deg); }
.asb-close-btn .asb-icon { width: 16px; height: 16px; }

/* ================================================================
   PRODUCT STRIP
   ================================================================ */
.asb-product-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--asb-bg);
  border-bottom: 1px solid var(--asb-line);
  flex-shrink: 0;
}

.asb-product-strip-img {
  flex: 0 0 50px;
  width: 50px; height: 50px;
  border-radius: var(--asb-radius-sm);
  overflow: hidden;
  background: var(--asb-white);
  box-shadow: var(--asb-shadow-sm);
}
.asb-product-strip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.asb-product-strip-info { min-width: 0; }

.asb-strip-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--asb-ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.asb-strip-prices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.asb-strip-original {
  font-size: 12px;
  font-weight: 700;
  color: var(--asb-muted);
}

/* After a deal is struck, original gets a strikethrough */
.asb-strip-original.is-struck del,
.asb-strip-original.is-struck {
  text-decoration: line-through;
  text-decoration-color: #b32d2e;
}

.asb-strip-offer {
  font-size: 13px;
  font-weight: 900;
  color: var(--asb-green);
  animation: asb-price-pop .5s cubic-bezier(.2,.8,.3,1) both;
}

.asb-strip-hint {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--asb-green);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes asb-price-pop {
  0%  { opacity: 0; transform: scale(.6); }
  70% { transform: scale(1.1); }
  100%{ opacity: 1; transform: scale(1); }
}

/* ================================================================
   CHAT BODY (messages)
   ================================================================ */
.asb-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  background: var(--asb-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--asb-line) transparent;
}

/* ---- Date separator ---- */
.asb-date-sep {
  text-align: center;
  font-size: 11px;
  color: var(--asb-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 4px 0;
}

/* ---- Message rows ---- */
.asb-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: asb-msg-in .28s ease both;
}

@keyframes asb-msg-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.asb-msg.is-bot  { flex-direction: row; }
.asb-msg.is-user { flex-direction: row-reverse; }

/* ---- Bubble ---- */
.asb-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.asb-msg.is-bot .asb-bubble {
  background: var(--asb-white);
  color: var(--asb-ink);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--asb-line);
  box-shadow: var(--asb-shadow-sm);
}

.asb-msg.is-user .asb-bubble {
  background: linear-gradient(135deg, var(--asb-blue), var(--asb-blue-light));
  color: var(--asb-white);
  border-bottom-right-radius: 4px;
}

/* ---- Bubble timestamp ---- */
.asb-bubble-time {
  display: block;
  font-size: 10.5px;
  opacity: .6;
  margin-top: 5px;
  text-align: right;
}
.asb-msg.is-bot .asb-bubble-time { text-align: left; }

/* ---- Mini avatar dot on bot messages ---- */
.asb-msg-avatar {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--asb-blue-light), var(--asb-gold));
  display: grid;
  place-items: center;
}
.asb-msg-avatar .asb-icon { width: 14px; height: 14px; color: var(--asb-blue-dark); }

/* ---- Typing indicator ---- */
.asb-typing-indicator {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: asb-msg-in .28s ease both;
}

.asb-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--asb-white);
  border: 1px solid var(--asb-line);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.asb-typing-dots span {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--asb-muted);
}
.asb-typing-dots span:nth-child(1) { animation: asb-bounce 1.1s .0s ease-in-out infinite; }
.asb-typing-dots span:nth-child(2) { animation: asb-bounce 1.1s .18s ease-in-out infinite; }
.asb-typing-dots span:nth-child(3) { animation: asb-bounce 1.1s .36s ease-in-out infinite; }

@keyframes asb-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40%            { transform: translateY(-6px); opacity: 1; }
}

/* ---- Price chip inside a bot bubble ---- */
.asb-price-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--asb-gold), var(--asb-gold-light));
  color: var(--asb-blue-dark);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0,28,98,.25);
}
.asb-price-chip .asb-icon { width: 14px; height: 14px; }

/* ================================================================
   DEAL BANNER (celebration)
   ================================================================ */
.asb-deal-banner {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(13,59,120,.96), rgba(8,43,91,.98));
  padding: 24px;
  animation: asb-banner-in .5s cubic-bezier(.16,.9,.24,1) both;
}

@keyframes asb-banner-in {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}

.asb-deal-banner-inner {
  text-align: center;
  color: var(--asb-white);
}

.asb-deal-confetti {
  font-size: 56px;
  display: block;
  margin-bottom: 16px;
  animation: asb-confetti-pop .6s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes asb-confetti-pop {
  0%  { transform: scale(.4) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); }
  100%{ transform: scale(1) rotate(0deg); opacity: 1; }
}

.asb-deal-title {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--asb-gold), var(--asb-gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.asb-deal-price-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.asb-deal-original {
  font-size: 20px;
  color: rgba(255,255,255,.5);
  text-decoration-color: #b94b55;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

.asb-deal-final {
  font-size: 44px;
  font-weight: 900;
  color: var(--asb-gold);
  line-height: 1;
  animation: asb-price-pop .6s .2s cubic-bezier(.2,.8,.3,1) both;
}

.asb-deal-savings {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  margin-bottom: 24px;
}

.asb-add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  padding: 16px 28px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--asb-blue-dark), var(--asb-blue-light));
  color: var(--asb-white);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,23,92,.38);
  transition: transform .22s ease, box-shadow .22s ease;
  overflow: hidden;
  position: relative;
  animation: asb-reveal-up .5s .4s ease both;
}

.asb-add-to-cart-btn::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  animation: asb-shimmer 3s ease-in-out infinite;
}
.asb-add-to-cart-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(0,23,92,.5); }
.asb-add-to-cart-btn:disabled { opacity: .65; cursor: wait; transform: none; }
.asb-add-to-cart-btn .asb-icon { width: 20px; height: 20px; }

@keyframes asb-shimmer {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}
@keyframes asb-reveal-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   IN-CHAT DEAL CONFIRMATION (replaces the old full-panel banner)
   ================================================================ */
.asb-deal-confirm-bubble {
  background: linear-gradient(150deg, var(--asb-blue-dark), var(--asb-blue-light));
  color: var(--asb-white);
  border: 1px solid rgba(255,255,255,.12);
}

.asb-deal-confirm-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--asb-gold);
  margin-bottom: 6px;
}

.asb-deal-confirm-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,.88);
  margin-bottom: 10px;
}

.asb-deal-confirm-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.asb-deal-confirm-price del {
  font-size: 14px;
  color: rgba(255,255,255,.55);
}

.asb-deal-confirm-price strong {
  font-size: 24px;
  font-weight: 900;
  color: var(--asb-gold);
  line-height: 1;
}

.asb-deal-confirm-savings {
  font-size: 13px;
  font-weight: 800;
  color: #8be0a8;
  text-align: center;
  margin-bottom: 6px;
}

.asb-add-to-cart-inline {
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  padding: 13px 18px;
  font-size: 14.5px;
}

.asb-add-to-cart-btn.is-added {
  background: linear-gradient(135deg, #1e9e5a, #36c278);
  color: var(--asb-white);
  box-shadow: 0 8px 20px rgba(30,158,90,.35);
  opacity: 1;
  cursor: default;
}

.asb-add-to-cart-btn.is-added::before { display: none; }

.asb-cart-success {
  background: #eafaf0;
  border: 1px solid #bfe6cd;
  color: #0a5c33;
}

.asb-cart-success strong {
  display: block;
  font-size: 14.5px;
  font-weight: 900;
}

.asb-cart-success-note {
  font-size: 13px;
  margin-top: 3px;
  color: #24724a;
}

.asb-view-cart-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 900;
  color: var(--asb-blue);
  text-decoration: none;
}

.asb-view-cart-link:hover { text-decoration: underline; }

/* ================================================================
   QUICK REPLY CHIPS
   ================================================================ */
.asb-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 14px;
  border-top: 1px solid var(--asb-line);
  flex-shrink: 0;
  background: var(--asb-bg);
}

.asb-quick-chip {
  padding: 8px 14px;
  border: 1.5px solid var(--asb-blue);
  border-radius: 999px;
  background: transparent;
  color: var(--asb-blue);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.asb-quick-chip:hover {
  background: var(--asb-blue);
  color: var(--asb-white);
  transform: translateY(-1px);
}
.asb-quick-chip.is-accept {
  border-color: var(--asb-green);
  color: var(--asb-green);
}
.asb-quick-chip.is-accept:hover {
  background: var(--asb-green);
  color: var(--asb-white);
}

/* ================================================================
   INPUT AREA
   ================================================================ */
.asb-chat-input-wrap {
  flex-shrink: 0;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--asb-line);
  background: var(--asb-white);
}

.asb-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asb-chat-input {
  flex: 1;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--asb-line);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  color: var(--asb-ink);
  background: var(--asb-bg);
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: 0;
  min-width: 0;
}
.asb-chat-input::placeholder { color: var(--asb-muted); }
.asb-chat-input:focus {
  border-color: var(--asb-blue-light);
  box-shadow: 0 0 0 3px rgba(26,95,173,.15);
}
.asb-chat-input:disabled { opacity: .5; cursor: not-allowed; }

.asb-send-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--asb-blue), var(--asb-blue-light));
  color: var(--asb-white);
  cursor: pointer;
  box-shadow: var(--asb-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.asb-send-btn:hover { transform: scale(1.1); box-shadow: var(--asb-shadow-md); }
.asb-send-btn:disabled { opacity: .5; cursor: wait; transform: none; }
.asb-send-btn .asb-icon { width: 18px; height: 18px; }

.asb-input-hint {
  font-size: 11.5px;
  color: var(--asb-muted);
  margin: 6px 4px 0;
  line-height: 1.4;
}

/* ================================================================
   SYSTEM MESSAGE (errors, info)
   ================================================================ */
.asb-system-msg {
  text-align: center;
  font-size: 12.5px;
  color: var(--asb-muted);
  padding: 6px 10px;
  background: var(--asb-bg);
  border-radius: var(--asb-radius-sm);
  border: 1px solid var(--asb-line);
}

.asb-system-msg.is-error {
  color: #b32d2e;
  background: #fff5f5;
  border-color: #f5c6c6;
}

/* ================================================================
   ATTEMPTS PROGRESS BAR
   ================================================================ */
.asb-attempts-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--asb-bg);
  border-top: 1px solid var(--asb-line);
  flex-shrink: 0;
}

.asb-attempts-label {
  font-size: 11.5px;
  color: var(--asb-muted);
  font-weight: 600;
  white-space: nowrap;
}

.asb-attempts-pips {
  display: flex;
  gap: 5px;
}

.asb-attempt-pip {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--asb-line);
  transition: background .3s ease;
}
.asb-attempt-pip.is-used { background: var(--asb-gold); }
.asb-attempt-pip.is-last { background: #e55959; }

/* ================================================================
   LOADING STATE (while session starts)
   ================================================================ */
.asb-chat-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex: 1;
  padding: 32px;
  text-align: center;
}

.asb-loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--asb-line);
  border-top-color: var(--asb-blue);
  border-radius: 50%;
  animation: asb-spin .8s linear infinite;
}
@keyframes asb-spin { to { transform: rotate(360deg); } }

.asb-loading-text {
  font-size: 13px;
  color: var(--asb-muted);
  font-weight: 600;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 600px) {
  .asb-btn-wrap {
    top: auto;
    bottom: 92px;
    right: 10px;
    transform: none;
    animation: asb-float-mobile 4.5s ease-in-out infinite;
  }

  .asb-bargain-btn {
    width: 124px;
    height: 80px;
    padding: 10px 12px 10px 10px;
    gap: 7px;
    border-radius: 22px 22px 22px 8px;
  }

  .asb-bargain-btn::after {
    right: 12px;
    bottom: -7px;
    border-left-width: 9px;
    border-top-width: 9px;
  }

  .asb-btn-pulse { border-radius: 22px 22px 22px 8px; }

  .asb-btn-icon { width: 34px; height: 34px; }
  .asb-btn-icon .asb-icon { width: 19px; height: 19px; }
  .asb-btn-status { width: 7px; height: 7px; }

  .asb-btn-label { font-size: 12px; line-height: 1.12; }
  .asb-btn-badge { width: 20px; height: 20px; font-size: 11px; top: -6px; right: -5px; }

  .asb-offer-popup {
    top: auto;
    bottom: 104px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    transform: translateY(20px) scale(.96);
    transform-origin: 100% 100%;
  }

  .asb-offer-popup.is-visible {
    transform: translateY(0) scale(1);
  }

  .asb-chat-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  .asb-chat-panel.is-open {
    transform: translateY(0);
  }

  .asb-chat-panel:not(.is-open) {
    transform: translateY(100%);
  }

  .asb-deal-final { font-size: 36px; }
}

@keyframes asb-float-mobile {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@media (max-width: 380px) {
  .asb-btn-wrap { bottom: 78px; }
  .asb-bargain-btn { width: 116px; height: 76px; }
  .asb-btn-label { font-size: 11.5px; }
  .asb-offer-popup { bottom: 88px; padding: 15px; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .asb-btn-wrap,
  .asb-bargain-btn,
  .asb-btn-pulse,
  .asb-bot-status,
  .asb-typing-dots span,
  .asb-price-chip,
  .asb-add-to-cart-btn::before,
  .asb-start-btn::before,
  .asb-deal-confetti,
  .asb-loading-spinner { animation: none !important; }

  .asb-chat-panel,
  .asb-overlay,
  .asb-offer-popup,
  .asb-bubble,
  .asb-msg,
  .asb-deal-banner { transition-duration: .01ms !important; }
}

/* ================================================================
   INTEGRATED NEGOTIATION EXPERIENCE
   Launcher, offer card and chat share one visual anchor so the flow
   feels like a single component. Presentation only — no logic changes.
   ================================================================ */
/* Keep a permanent scrollbar track. The widget never locks body scrolling,
   so opening the overlay cannot change the page width or cause a jump. */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

html:root {
  --asb-electric:       #0b6bff;
  --asb-electric-deep:  #003fa8;
  --asb-electric-soft:  #eaf3ff;
  --asb-sun:            #ffd84d;
  --asb-sun-soft:       #fff6cf;
  --asb-ink-deep:       #0a1f4d;
}

.asb-experience {
  position: fixed;
  top: 50%;
  right: clamp(10px, 2vw, 18px);
  bottom: auto;
  width: 0;
  height: 0;
  z-index: 9000;
  pointer-events: none;
}
.asb-experience > * { pointer-events: auto; }

.asb-overlay {
  background: rgba(4,20,55,.58);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* ---------- Floating negotiation sticker ---------- */
.asb-btn-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  transform: translateY(-50%);
  will-change: transform;
  animation: asb-launcher-float 5.2s ease-in-out infinite;
  transition: transform .36s cubic-bezier(.2,1,.3,1), opacity .28s ease, filter .28s ease;
}

.asb-bargain-btn {
  /* The artwork is a transparent PNG; no painted button background. */
  animation: none;
  width: clamp(104px, 11vw, 132px);
  height: auto;
  aspect-ratio: 1044 / 771;
  padding: 0;
  gap: 0;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  /* box-shadow: 0 14px 30px rgba(3,55,160,.24); */
  transform: rotate(-2.5deg);
  overflow: visible;
}

/* Circular launcher — no speech-bubble tail, badge, or painted shine. */
.asb-bargain-btn::after { content: none; }
.asb-btn-glow { display: none; }

.asb-btn-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.asb-btn-glow::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -45%;
  width: 55%;
  height: 340%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
  transform: rotate(22deg);
  animation: asb-sticker-shine 4.8s ease-in-out infinite;
}

.asb-bargain-btn:hover {
  transform: rotate(0deg) translateY(-5px) scale(1.05);
  /* box-shadow: 0 22px 44px rgba(3,55,160,.3); */
  /* filter: brightness(1.04); */
}
.asb-bargain-btn:active { transform: rotate(-1deg) scale(.98); }

.asb-btn-image {
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1044 / 771;
  object-fit: contain;
  pointer-events: none;
  /* filter: drop-shadow(0 5px 8px rgba(0,20,80,.24)); */
  transition: transform .28s ease, filter .28s ease;
}
.asb-bargain-btn:hover .asb-btn-image { transform: scale(1.03); }

.asb-btn-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32);
}
.asb-btn-icon .asb-icon { width: 23px; height: 23px; }
.asb-btn-status { border-color: #0757d6; }

.asb-btn-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 18px;
}
.asb-btn-kicker {
  display: block;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--asb-sun);
  text-shadow: 0 1px 2px rgba(0,20,80,.4);
}
.asb-btn-label {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.08;
  color: #fff;
}

.asb-btn-arrow {
  position: absolute;
  right: 11px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe27a, var(--asb-sun));
  color: #052a7d;
  box-shadow: 0 5px 14px rgba(0,20,80,.32);
}
.asb-btn-arrow .asb-icon { width: 14px; height: 14px; stroke-width: 2.4; }

.asb-btn-badge {
  top: -10px;
  right: -8px;
  width: 27px;
  height: 27px;
  font-size: 14px;
  background: linear-gradient(135deg, #ffe27a, var(--asb-sun));
  color: #052a7d;
  box-shadow: 0 6px 14px rgba(0,20,80,.32);
}
.asb-btn-pulse {
  /* border-radius: 50%; */
  /* border: 2px solid rgba(255,216,77,.55); */
  /* inset: -6px; */
  /* box-shadow: 0 0 26px rgba(255,199,46,.2); */
  animation: asb-pulse 3.2s ease-out infinite;
}

.asb-experience.is-offer .asb-btn-wrap,
.asb-experience.is-chat .asb-btn-wrap {
  animation: none;
  transform: translateY(calc(-50% + 10px)) scale(.72);
  opacity: .28;
  pointer-events: none;
  filter: blur(.4px);
}

/* ---------- Integrated offer card ---------- */
.asb-offer-popup {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
  width: 344px;
  max-width: calc(100vw - 24px);
  padding: 0;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 26px;
  background: linear-gradient(160deg, #fff 0%, #f3f8ff 48%, #e2efff 100%);
  box-shadow:
    0 32px 80px rgba(2,36,110,.42),
    0 10px 24px rgba(2,36,110,.18),
    inset 0 1px 0 #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-50% + 34px)) translateX(34px) scale(.72) rotate(4deg);
  transform-origin: 100% 50%;
  will-change: transform, opacity;
  transition:
    opacity .3s ease,
    transform .54s cubic-bezier(.16,1.16,.28,1),
    box-shadow .54s ease,
    visibility .54s;
  overflow: visible;
}
.asb-offer-popup.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) scale(1) rotate(0deg);
}
.asb-experience.is-expanding .asb-offer-popup {
  opacity: 0;
  transform: translateY(-50%) translateX(12px) scale(.88) rotate(-1deg);
  transition-duration: .22s;
}
.asb-offer-popup::before {
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(circle at 92% 0%, rgba(11,107,255,.16), transparent 46%);
}

.asb-offer-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}
.asb-offer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe27a, var(--asb-sun));
  color: #052a7d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 5px 14px rgba(255,199,46,.35);
}
.asb-offer-badge .asb-icon { width: 13px; height: 13px; }
.asb-offer-close {
  position: relative;
  top: auto;
  right: auto;
  width: 30px;
  height: 30px;
  background: rgba(11,107,255,.09);
  color: #0757d6;
  border: 1px solid rgba(11,107,255,.12);
}

.asb-offer-product {
  position: relative;
  z-index: 1;
  margin: 14px 18px 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.92), 0 8px 20px rgba(4,60,160,.08);
}
.asb-offer-img {
  flex-basis: 66px;
  width: 66px;
  height: 66px;
  border-radius: 15px;
}
.asb-offer-name { font-size: 15px; color: var(--asb-ink-deep); }
.asb-offer-sub { font-size: 12px; color: #5c74a8; }

.asb-offer-prices {
  position: relative;
  z-index: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0 18px 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #062f8f 0%, #0757d6 55%, #0b6bff 100%);
  box-shadow: 0 12px 26px rgba(4,67,180,.28), inset 0 1px 0 rgba(255,255,255,.25);
}
.asb-offer-price-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
}
.asb-offer-new {
  font-size: 28px;
  color: var(--asb-sun);
  text-shadow: 0 2px 8px rgba(0,20,80,.35);
}
.asb-offer-note {
  position: relative;
  z-index: 1;
  margin: 0 20px 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: #48639b;
}

.asb-start-btn {
  position: relative;
  z-index: 1;
  width: calc(100% - 36px);
  margin: 0 18px 18px;
  padding: 14px 18px;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffe27a, var(--asb-sun));
  color: #052a7d;
  font-size: 14.5px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(255,199,46,.38), inset 0 1px 0 rgba(255,255,255,.75);
}
.asb-start-btn::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
}
.asb-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(255,199,46,.48), inset 0 1px 0 rgba(255,255,255,.8);
}
.asb-start-btn .asb-icon { width: 18px; height: 18px; stroke-width: 2.2; }

.asb-offer-connector {
  position: absolute;
  right: -7px;
  top: 50%;
  bottom: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--asb-sun);
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(2,36,110,.28);
  transform: translateY(-50%);
  pointer-events: none;
}

/* ---------- Chat grows from the same anchor ---------- */
.asb-chat-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
  width: 400px;
  height: min(680px, calc(100vh - 44px));
  max-width: calc(100vw - 24px);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 26px;
  box-shadow: 0 36px 90px rgba(2,30,100,.46), 0 12px 30px rgba(2,30,100,.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-50% + 40px)) scale(.78) rotate(2deg);
  transform-origin: 100% 50%;
  will-change: transform, opacity;
  transition:
    transform .52s cubic-bezier(.16,1.08,.26,1),
    opacity .32s ease,
    box-shadow .52s ease,
    visibility .52s;
}
.asb-chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1) rotate(0deg);
}
.asb-chat-panel::before {
  height: 4px;
  background: linear-gradient(90deg, var(--asb-sun), #fff3b0, var(--asb-electric));
}

.asb-chat-header {
  padding: 18px;
  background:
    radial-gradient(circle at 85% -20%, rgba(255,216,77,.35), transparent 45%),
    linear-gradient(135deg, #0a5fe0 0%, #003fa8 60%, #002b7c 100%);
}
.asb-bot-avatar {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #fff6cf, var(--asb-sun));
  box-shadow: 0 0 0 3px rgba(255,255,255,.16), 0 8px 18px rgba(0,20,80,.3);
}
.asb-bot-avatar .asb-icon { color: #003fa8; }
.asb-bot-status { border-color: #003fa8; }
.asb-chat-header-name { font-size: 15px; font-weight: 900; }
.asb-chat-header-status { font-size: 11.5px; }
.asb-close-btn {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.24);
  color: #fff;
}

.asb-product-strip {
  padding: 12px 16px;
  background: linear-gradient(135deg, #f7faff, #eaf3ff);
  border-bottom: 1px solid #d6e6ff;
}
.asb-product-strip-img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(4,60,160,.16);
}
.asb-strip-name { font-size: 14px; font-weight: 800; }
.asb-strip-original { font-size: 13px; color: #49639c; }
.asb-strip-offer {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--asb-sun-soft);
  color: #0057d6;
  font-size: 15px;
}

.asb-chat-body {
  padding: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(11,107,255,.08), transparent 45%),
    linear-gradient(180deg, #fbfdff, #f4f8ff);
}
.asb-msg.is-bot .asb-bubble {
  border-color: #d9e7ff;
  box-shadow: 0 6px 18px rgba(4,60,160,.08);
}
.asb-msg.is-user .asb-bubble {
  background: linear-gradient(135deg, #0b6bff, #0046c4);
  box-shadow: 0 8px 18px rgba(4,70,190,.22);
}
.asb-msg-avatar { background: linear-gradient(135deg, #fff6cf, var(--asb-sun)); }
.asb-price-chip {
  background: linear-gradient(135deg, #ffe27a, #fff0ad);
  color: #052a7d;
  box-shadow: 0 6px 16px rgba(255,199,46,.4);
}

.asb-chat-input-wrap {
  padding: 12px 14px 14px;
  border-top: 1px solid #d6e6ff;
  box-shadow: 0 -8px 24px rgba(4,60,160,.05);
}
.asb-chat-input {
  height: 48px;
  background: #f2f7ff;
  border-color: #cfe0ff;
}
.asb-chat-input:focus {
  border-color: var(--asb-electric);
  box-shadow: 0 0 0 3px rgba(11,107,255,.16);
}
.asb-send-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ffe27a, var(--asb-sun));
  color: #052a7d;
  box-shadow: 0 8px 20px rgba(255,199,46,.4);
}
.asb-send-btn:hover { box-shadow: 0 12px 26px rgba(255,199,46,.5); }
.asb-quick-chip { border-color: #cfe0ff; color: #0757d6; }

@keyframes asb-launcher-float {
  0%, 100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 7px)); }
}
@keyframes asb-sticker-shine {
  0%, 55% { left: -45%; }
  85%, 100% { left: 130%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .asb-offer-popup { width: 340px; }
  .asb-chat-panel { width: 380px; }
}

@media (max-width: 600px) {
  .asb-experience {
    right: 10px;
  }
  .asb-btn-wrap { animation: asb-launcher-float 4.6s ease-in-out infinite; }
  .asb-bargain-btn {
    width: clamp(84px, 24vw, 104px);
    height: auto;
    aspect-ratio: 1044 / 771;
    padding: 0;
    gap: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .asb-btn-image { width: 100%; height: auto; max-width: 100%; }
  .asb-bargain-btn::after { content: none; }

  .asb-offer-popup {
    right: 0;
    top: 0;
    bottom: auto;
    width: min(calc(100vw - 20px), 360px);
    max-width: none;
    transform: translateY(calc(-50% + 26px)) scale(.88) rotate(2deg);
  }
  .asb-chat-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    border-radius: 0;
    transform: translateY(100%) scale(1);
    transform-origin: 50% 100%;
  }
  .asb-chat-panel.is-open { transform: translateY(0) scale(1); }
  .asb-chat-header { padding: 16px; }
}

@media (max-width: 380px) {
  .asb-experience { right: 8px; }
  .asb-bargain-btn { width: 88px; height: auto; aspect-ratio: 1044 / 771; }
  .asb-btn-image { width: 100%; height: auto; max-width: 100%; }
  .asb-offer-popup { width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .asb-btn-wrap,
  .asb-btn-glow::before,
  .asb-chat-panel,
  .asb-offer-popup { animation: none !important; transition-duration: .01ms !important; }
}

/* ================================================================
   HIDDEN ATTRIBUTE
   Author `display` rules above must never override the HTML `hidden`
   attribute. Without this the deal banner (display:flex, inset:0) sits
   on top of the whole panel from page load, hiding the chat input and
   quick replies and making the widget impossible to use.
   ================================================================ */
/* The old celebration overlay is retired — confirmations live in chat. */
.asb-deal-banner,
.asb-deal-banner[hidden],
.asb-offer-popup[hidden],
.asb-quick-replies[hidden],
.asb-overlay[hidden],
.asb-strip-offer[hidden],
.asb-attempts-bar[hidden] {
  display: none !important;
}

/* ================================================================
   FINAL DEAL CONFIRMATION CARD
   High specificity fixes the inherited white bubble background/text.
   Presentation only — markup, text and handlers stay untouched.
   ================================================================ */
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 16px 16px 13px;
  border: 1px solid #a9c9ff;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,216,77,.32), transparent 46%),
    linear-gradient(145deg, #fbfdff 0%, #e9f2ff 100%);
  color: #0a1f4d;
  box-shadow: 0 14px 32px rgba(4,60,160,.16), inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
}
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--asb-sun), #0b6bff);
}
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble > * {
  position: relative;
  z-index: 1;
}

.asb-deal-confirm-title {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .01em;
  color: #003fa8;
}
.asb-deal-confirm-text {
  margin: 0 0 11px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.55;
  color: #274477;
}
.asb-deal-confirm-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin: 0 0 9px;
  border: 1px solid #d6e6ff;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 5px 14px rgba(4,60,160,.1);
}
.asb-deal-confirm-price del {
  font-size: 13px;
  font-weight: 700;
  color: #6b7ca8;
}
.asb-deal-confirm-price strong {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: #0b6bff;
}
.asb-deal-confirm-savings {
  display: inline-block;
  padding: 5px 11px;
  margin: 0 0 3px;
  border: 1px solid #bfe6cd;
  border-radius: 999px;
  background: #e8f9ee;
  color: #0a6b3d;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
}
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble .asb-bubble-time {
  margin-top: 9px;
  font-size: 10px;
  font-weight: 700;
  color: #49639c;
  opacity: 1;
  text-align: center;
}
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble .asb-add-to-cart-btn.asb-add-to-cart-inline {
  width: 100%;
  max-width: none;
  margin: 11px 0 0;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 13px;
  background: linear-gradient(135deg, #ffd84d 0%, #ffc233 55%, #0b6bff 160%);
  color: #052a7d;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(255,184,0,.3), 0 6px 14px rgba(11,107,255,.2);
}
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble .asb-add-to-cart-btn.asb-add-to-cart-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255,184,0,.38), 0 8px 18px rgba(11,107,255,.26);
}
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble .asb-add-to-cart-btn.asb-add-to-cart-inline.is-added {
  background: linear-gradient(135deg, #1e9e5a, #36c278);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30,158,90,.32);
}
.asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble .asb-add-to-cart-btn.asb-add-to-cart-inline:disabled {
  opacity: .72;
  cursor: wait;
  transform: none;
}

@media (max-width: 600px) {
  .asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble { padding: 14px 13px 12px; }
  .asb-deal-confirm-title { font-size: 16px; }
  .asb-deal-confirm-text { font-size: 13px; }
  .asb-deal-confirm-price { padding: 9px 10px; }
  .asb-deal-confirm-price strong { font-size: 23px; }
  .asb-msg.is-bot .asb-bubble.asb-deal-confirm-bubble .asb-add-to-cart-btn.asb-add-to-cart-inline {
    padding: 12px 14px;
    font-size: 14px;
  }
}
@media (max-width: 380px) {
  .asb-deal-confirm-title { font-size: 15px; }
  .asb-deal-confirm-text { font-size: 12.5px; }
  .asb-deal-confirm-price strong { font-size: 21px; }
  .asb-deal-confirm-savings { font-size: 11.5px; }
}
