/* Approved checkout identity: Figma 737:390 / 737:432. Scoped to chat only. */
#chat .agentCard{display:grid;grid-template-columns:80px minmax(0,1fr);gap:4px 16px;padding:16px;margin:12px 0;border:1px solid #dce4e8;border-radius:13px;background:#fff;color:#2b1421;font-family:Manrope,sans-serif;line-height:1.45;text-align:left;box-sizing:border-box}
#chat .agentCardPhoto{grid-row:1/3;width:80px;height:80px;border-radius:9px;background:#fff;font-size:12px;color:#6d8798;display:grid;place-items:center;overflow:hidden}
#chat .agentCardPhoto img{width:100%;height:100%;object-fit:contain}
#chat .agentCardCopy,#chat .agentCardPrices{min-width:0;overflow-wrap:anywhere}
#chat .agentCardTitle{display:block;color:#2b1421;font-size:15px;font-weight:600;line-height:1.45;text-decoration:none}
#chat .agentCardTitle:hover{text-decoration:underline}
#chat .agentCardPrices{grid-column:2}
#chat .agentCardSingle{grid-template-columns:80px minmax(0,1fr) auto}
#chat .agentCardSingle .agentCardPrices{grid-column:3;grid-row:1}
#chat .agentCardSingle .agentCardVariant{margin-top:0;display:block}
#chat .agentCardCopy>.agentCardVariantName{display:block;margin-top:4px}
#chat .agentCardVariant{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:baseline;margin-top:4px}
#chat .agentCardVariantName{font-size:13px;font-weight:600;flex:1}
#chat .agentCardPrice{font-size:14px;font-weight:600;white-space:nowrap}
#chat .agentCardAvailability{font-size:12px;color:#6d8798;flex-basis:100%}
#chat .agentReply,#chat .agentCustomer{white-space:pre-wrap;overflow-wrap:anywhere}
#chat .agentPending,#chat .agentError{font:inherit;font-size:13px;line-height:1.5}
#chat .agentRetry{font:inherit;color:inherit;background:transparent;border:0;text-decoration:underline;cursor:pointer;padding:8px 0}
#chat button:disabled,.bvAiComposer button:disabled{cursor:wait;opacity:.55}
#chat #mic:disabled{cursor:not-allowed}
@media(max-width:760px){#chat .agentCard{grid-template-columns:54px minmax(0,1fr);gap:4px 12px;padding:13px}#chat .agentCardSingle .agentCardPrices{grid-column:2;grid-row:2}#chat .agentCardPhoto{width:54px;height:54px}#chat .agentCardTitle{font-size:14px}#chat .agentCardVariantName{font-size:12px}#chat .agentCardVariant{display:block}#chat .agentCardPrice{display:block;margin-top:12px}#chat .agentCardAvailability{display:block;margin-top:4px}}

/* Approved UI-02, Figma 91:53 / 91:77, 30.10.2026 17:53 Europe/Moscow.
   The system status bar belongs to the device; it is not drawn by this shell. */
#chat[data-chat-shell] {
  --chat-ink:#2b1421;
  --chat-agent:#f5f5f3;
  --chat-client:#dee5ea;
  --chat-border:#dce4e8;
  --chat-system:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  margin:auto;border:0;border-radius:0;
  padding:0;
  background:#fff;
  color:var(--chat-ink);
  font:400 14px/20px var(--chat-system);
  text-align:left;
  overflow:hidden;
}
#chat[data-chat-shell],#chat[data-chat-shell] * {box-sizing:border-box}
#chat[data-chat-shell][open] {display:flex;flex-direction:column}
#chat[data-chat-shell]::backdrop {background:#0009;backdrop-filter:blur(8px)}
#chat[data-chat-shell] .agentChatHead {
  position:relative;flex:none;height:44px;min-height:44px;
  border-bottom:1px solid var(--chat-border);background:#fff;
}
#chat[data-chat-shell] .agentChatClose {
  position:absolute;inset:0 auto auto 6px;display:grid;place-items:center;
  width:44px;height:44px;padding:0;border:0;border-radius:0;background:transparent;
}
#chat[data-chat-shell] .agentChatClose img {display:block;width:23px;height:23px}
#chat[data-chat-shell] .agentChatBrand {
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  display:flex;align-items:center;gap:4px;width:max-content;
  font:600 11px/1.05 Unbounded,sans-serif;letter-spacing:0;color:var(--chat-ink);
  text-align:left;white-space:nowrap;
}
#chat[data-chat-shell] .agentChatBrand img {display:block;flex:none;width:17px;height:17px}
#chat[data-chat-shell] #messages {
  flex:1 1 auto;min-height:0;max-height:none;
  margin:0;padding:25px 16px;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;scrollbar-gutter:stable;
  -webkit-overflow-scrolling:touch;
}
#chat[data-chat-shell] .agentChatIntro {
  margin:38px 0 0;padding:0;max-width:358px;
  font:400 16px/24px var(--chat-system);letter-spacing:0;
}
#chat[data-chat-shell] .agentChatIntro:has(~.agentCustomer),
#chat[data-chat-shell] .agentChatIntro:has(~.agentReply) {display:none}
#chat[data-chat-shell] #messages :is(.agentCustomer,.agentReply) {
  display:table;width:fit-content;max-width:min(100%,288px);
  min-height:44px;margin:0 0 16px;padding:12px;
  font:400 14px/20px var(--chat-system);letter-spacing:0;
  white-space:pre-wrap;overflow-wrap:anywhere;text-align:left;
  border:0;border-radius:12px;background:var(--chat-agent);color:var(--chat-ink);
}
#chat[data-chat-shell] #messages .agentCustomer {
  max-width:min(100%,274px);margin-left:auto;background:var(--chat-client);
  border-bottom-right-radius:4px;
}
#chat[data-chat-shell] #messages .agentReply {border-bottom-left-radius:4px}
#chat[data-chat-shell] #messages :is(.agentPending,.agentError) {
  font:400 14px/20px var(--chat-system);letter-spacing:0;margin:0 0 16px;
}
#chat[data-chat-shell] .agentRetry {min-height:44px;padding:12px 0;line-height:20px}
#chat[data-chat-shell] #chatForm {
  display:flex;flex:none;align-items:flex-end;gap:9px;
  margin:0;padding:9px 12px calc(12px + env(safe-area-inset-bottom,0px));
  border:0;border-top:1px solid var(--chat-border);border-radius:0;background:#fff;
}
#chat[data-chat-shell] #message {
  display:block;flex:1;min-width:0;width:0;height:44px;min-height:44px;max-height:164px;
  margin:0;padding:11px 12px;border:1px solid var(--chat-border);border-radius:22px;
  resize:none;overflow-y:hidden;background:var(--chat-agent);color:var(--chat-ink);
  font:400 14px/20px var(--chat-system);letter-spacing:0;box-shadow:none;
}
#chat[data-chat-shell] #message::placeholder {color:#88929b;opacity:1}
#chat[data-chat-shell] #chatForm .agentChatSend {
  display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;
  margin:0;padding:0;border:0;border-radius:50%;background:var(--chat-ink);color:#fff;
}
#chat[data-chat-shell] .agentChatSend img {display:block;width:24px;height:24px}
#chat[data-chat-shell] :is(button,textarea):focus-visible {outline:2px solid var(--chat-ink);outline-offset:2px}
#chat[data-chat-shell] .agentChatSr {
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
/* Desktop D01: one shared window on the homepage and collection. */
@media(min-width:761px) {
  #chat[data-chat-shell] {
    width:min(760px,calc(100vw - 48px));max-width:760px;
    height:min(816px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);
    border-radius:16px;
    box-shadow:0 0 0 1px var(--chat-border),0 16px 56px #2b142126;
  }
  #chat[data-chat-shell]::backdrop {background:#2b142129;backdrop-filter:blur(6px)}
  #chat[data-chat-shell] #messages {padding:24px;scrollbar-gutter:auto}
  #chat[data-chat-shell] #messages .agentReply {max-width:min(100%,520px)}
  #chat[data-chat-shell] #messages .agentCustomer {max-width:min(100%,480px)}
  #chat[data-chat-shell] .agentChatIntro {
    width:min(100%,456px);min-height:44px;margin:0 0 16px;padding:12px;
    border-radius:12px 12px 12px 4px;background:var(--chat-agent);
    font:400 14px/20px var(--chat-system);
  }
  #chat[data-chat-shell] .agentPendingText {
    display:inline-flex;align-items:center;min-height:44px;padding:12px;
    border-radius:12px 12px 12px 4px;background:var(--chat-agent);
  }
  #chat[data-chat-shell] .agentPendingDots {display:inline-flex;align-items:center;gap:4px;margin-left:8px}
  #chat[data-chat-shell] .agentPendingDots i {width:4px;height:4px;border-radius:50%;background:#7e6c76}
  #chat[data-chat-shell] .agentError {
    width:min(100%,520px);padding:12px;border-radius:12px;background:#f8e8e8;
  }
  #chat[data-chat-shell] .agentRetry {
    display:block;margin-top:8px;padding:0 12px;border:1px solid var(--chat-border);
    border-radius:12px;background:#fff;color:var(--chat-ink);font:inherit;text-decoration:none;
  }
  #chat[data-chat-shell] #message:placeholder-shown + .agentChatSend {opacity:.36}
  #chat[data-chat-shell] .agentChatLatest {
    position:absolute;right:clamp(24px,5vw,48px);z-index:1;
    width:132px;min-height:44px;padding:0 12px;border:0;border-radius:12px;
    background:var(--chat-client);color:var(--chat-ink);
    font:400 13px/20px var(--chat-system);cursor:pointer;
  }
  #chat[data-chat-shell] #messages .chatProducts {margin-inline:-24px;padding-inline:24px}
  #chat[data-chat-shell] #chatForm {padding:12px 20px 16px;gap:12px}
  #chat[data-chat-shell][data-chat-opening] {
    overflow:visible;background:transparent;box-shadow:none;
  }
  #chat[data-chat-shell] .agentChatOpeningSurface {
    position:fixed;pointer-events:none;z-index:-1;background:#fff;
    box-shadow:0 0 0 1px var(--chat-border),0 16px 56px #2b142126;
  }
}
@media(min-width:761px) and (prefers-reduced-motion:no-preference) {
  #chat[data-chat-shell] .agentPendingDots i {animation:chatPendingDot 900ms ease-in-out infinite alternate}
  #chat[data-chat-shell] .agentPendingDots i:nth-child(2) {animation-delay:150ms}
  #chat[data-chat-shell] .agentPendingDots i:nth-child(3) {animation-delay:300ms}
  #chat[data-chat-opening]::backdrop {
    animation:chatBackdropIn 260ms cubic-bezier(.2,.8,.2,1) both;
  }
  #chat[data-chat-closing]::backdrop {
    animation:chatBackdropOut 140ms ease-out both;
  }
}
@keyframes chatPendingDot {from {opacity:.35} to {opacity:1}}
@keyframes chatBackdropIn {from {opacity:0} to {opacity:1}}
@keyframes chatBackdropOut {from {opacity:1} to {opacity:0}}
@media(max-width:760px) {
  #chat[data-chat-shell] .agentChatLatest {display:none}
  #chat[data-chat-shell] {
    position:fixed;inset:auto;top:var(--chat-visible-top,0px);left:0;
    width:100%;max-width:100%;height:var(--chat-visible-height,100dvh);
    max-height:var(--chat-visible-height,100dvh);margin:0;border:0;border-radius:0;
  }
  #chat[data-chat-shell] .agentChatHead {
    height:calc(44px + env(safe-area-inset-top,0px));
    min-height:calc(44px + env(safe-area-inset-top,0px));
    padding-top:env(safe-area-inset-top,0px);
  }
  #chat[data-chat-shell] .agentChatClose {top:env(safe-area-inset-top,0px)}
  #chat[data-chat-shell] .agentChatBrand {top:calc(22px + env(safe-area-inset-top,0px))}
  #chat[data-chat-shell] #messages {min-height:0;max-height:none;scrollbar-gutter:auto}
}

/* CHAT-UX-01. Uses the existing brand sign and chat palette. */
.bvChatResume {display:none}
@media(min-width:761px) {
  .bvChatResume:not([hidden]) {
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:20;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    min-height:44px;
    padding:8px 16px;
    border:1px solid #dce4e8;
    border-radius:22px;
    background:#fff;
    color:#2b1421;
    box-shadow:0 4px 16px #2b14211c;
    font:600 14px/20px Manrope,sans-serif;
    cursor:pointer;
  }
  .bvChatResume img {display:block;width:16px;height:16px}
  .bvChatResume:hover {background:#f5f5f3}
  .bvChatResume:focus-visible {outline:2px solid #2b1421;outline-offset:3px}
  body:has(#chat[open]) .bvChatResume {visibility:hidden}
}
