/* webchat: SOBACO Chat — floating button + panel. Black / white with the dark green #1f4d3a accent. Classes sc-. Works in light and
   dark shop themes (own colours, no theme variables). --sc-lift (set by chat.js) lifts everything above the cookie banner and the
   product page's sticky buy bar so it never covers the cart / buy buttons or the consent choices. */
#sbc-chat { --sc-green: #1f4d3a; --sc-ink: #0e0e0e; --sc-paper: #ffffff; --sc-line: #dcdad2; --sc-soft: #f2f1ec; --sc-lift: 0px;
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px) + var(--sc-lift)); z-index: 36; font: 400 14px/1.4 Helvetica, Arial, sans-serif; color: var(--sc-ink); letter-spacing: 0; text-transform: none; }
#sbc-chat[hidden] { display: none; }
#sbc-chat.sc-open { z-index: 80; }
#sbc-chat *, #sbc-chat *::before, #sbc-chat *::after { box-sizing: border-box; }
#sbc-chat button, #sbc-chat input, #sbc-chat textarea { font: inherit; color: inherit; letter-spacing: 0; text-transform: none; }

.sc-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 46px; min-width: 46px; padding: 0 14px; border: 1px solid #ffffff33; border-radius: 23px;
  background: var(--sc-ink); color: #fff; cursor: pointer; box-shadow: 0 4px 18px rgba(0, 0, 0, .28); }
.sc-btn:hover { background: var(--sc-green); }
.sc-btn:focus-visible, .sc-send:focus-visible, .sc-x:focus-visible, .sc-chip:focus-visible, .sc-wa:focus-visible, .sc-ogo:focus-visible { outline: 2px solid var(--sc-green); outline-offset: 2px; }
.sc-btn .sc-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.sc-btn-t { font-weight: 700; font-size: 13px; }
.sc-dot { position: absolute; top: 3px; right: 3px; width: 11px; height: 11px; border-radius: 50%; background: #3fbf7f; border: 2px solid var(--sc-ink); }
.sc-dot[hidden] { display: none; }

.sc-panel { position: absolute; right: 0; bottom: 56px; width: min(372px, calc(100vw - 28px)); height: min(560px, calc(100dvh - 120px - var(--sc-lift))); display: flex; flex-direction: column;
  background: var(--sc-paper); color: var(--sc-ink); border: 1px solid var(--sc-ink); box-shadow: 0 14px 48px rgba(0, 0, 0, .35); overflow: hidden; border-radius: 10px; }
.sc-panel[hidden] { display: none; }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 16px; background: var(--sc-ink); color: #fff; border-bottom: 3px solid var(--sc-green); }
.sc-ht { display: flex; flex-direction: column; min-width: 0; }
.sc-ht strong { font-size: 15px; letter-spacing: .02em; }
.sc-ht span { font-size: 12px; color: #ffffffb3; }
.sc-x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: #fff; cursor: pointer; border-radius: 50%; }
.sc-x:hover { background: #ffffff22; }
.sc-x .sc-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.sc-list { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; background: #fff; overscroll-behavior: contain; }
.sc-m { display: flex; flex-direction: column; max-width: 92%; gap: 6px; }
.sc-you { align-self: flex-end; align-items: flex-end; }
.sc-bot, .sc-staff { align-self: flex-start; }
.sc-b { padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-you .sc-b { background: var(--sc-ink); color: #fff; border-bottom-right-radius: 3px; }
.sc-bot .sc-b { background: var(--sc-soft); border-bottom-left-radius: 3px; }
.sc-staff .sc-b { background: #fff; border: 1px solid var(--sc-green); border-left-width: 4px; border-bottom-left-radius: 3px; }
.sc-who { font-size: 11px; font-weight: 700; color: var(--sc-green); text-transform: uppercase; letter-spacing: .05em; }
.sc-b a { color: inherit; text-decoration: underline; }
.sc-note { align-self: center; text-align: center; font-size: 12px; color: #5b5b55; background: var(--sc-soft); padding: 6px 10px; border-radius: 8px; max-width: 92%; }
.sc-typing .sc-b { display: inline-flex; gap: 4px; padding: 12px 14px; }
.sc-typing i { width: 6px; height: 6px; border-radius: 50%; background: #8a8a82; animation: sc-bl 1s infinite ease-in-out; }
.sc-typing i:nth-child(2) { animation-delay: .15s; } .sc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sc-bl { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-typing i { animation: none; opacity: .6; } }

.sc-cards { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; max-width: 100%; scroll-snap-type: x proximity; }
.sc-card { flex: 0 0 142px; display: flex; flex-direction: column; gap: 3px; padding: 7px; border: 1px solid var(--sc-line); border-radius: 8px; background: #fff; color: var(--sc-ink); text-decoration: none; scroll-snap-align: start; }
.sc-card:hover, .sc-card:focus-visible { border-color: var(--sc-green); }
.sc-card img, .sc-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; background: var(--sc-soft); display: block; }
.sc-cname { font-weight: 700; font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-price { display: flex; gap: 6px; align-items: baseline; font-size: 13px; }
.sc-price s { color: #77776f; font-size: 11.5px; }
.sc-sizes, .sc-sold { font-size: 11px; color: #55554f; }
.sc-sold { color: #a33; font-weight: 700; }
.sc-view { margin-top: 2px; font-size: 11.5px; font-weight: 700; color: var(--sc-green); text-transform: uppercase; letter-spacing: .05em; }

.sc-chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-top: 1px solid var(--sc-line); background: #fff; flex: none; }
.sc-chip { flex: none; padding: 6px 11px; border: 1px solid var(--sc-ink); border-radius: 999px; background: #fff; cursor: pointer; font-size: 12.5px; white-space: nowrap; }
.sc-chip:hover { background: var(--sc-ink); color: #fff; }
.sc-chip-order { border-color: var(--sc-green); color: var(--sc-green); }
.sc-chip-order:hover { background: var(--sc-green); }

.sc-order { padding: 10px 12px; border-top: 1px solid var(--sc-line); background: var(--sc-soft); flex: none; }
.sc-order[hidden] { display: none; }
.sc-oform { display: grid; gap: 7px; }
.sc-oform input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #b9b7ad; border-radius: 6px; background: #fff; font-size: 16px; }
.sc-ogo { min-height: 40px; border: 0; border-radius: 6px; background: var(--sc-green); color: #fff; font-weight: 700; cursor: pointer; }
.sc-ohelp { margin: 0; font-size: 11.5px; color: #55554f; }
.sc-ostatus { margin: 0; font-size: 12.5px; color: #a33; min-height: 0; }
.sc-ostatus:empty { display: none; }

.sc-foot { flex: none; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--sc-line); background: #fff; display: grid; gap: 8px; }
.sc-row { position: relative; display: flex; gap: 8px; align-items: flex-end; }
.sc-input { flex: 1; min-height: 42px; max-height: 96px; resize: none; padding: 10px 12px; border: 1px solid #b9b7ad; border-radius: 10px; background: #fff; font-size: 16px; line-height: 1.3; }
.sc-input:focus { outline: 2px solid var(--sc-green); outline-offset: 0; border-color: var(--sc-green); }
.sc-count { position: absolute; left: 10px; bottom: -14px; font-size: 10.5px; color: #77776f; }
.sc-send { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--sc-ink); color: #fff; cursor: pointer; }
.sc-send:hover:not(:disabled) { background: var(--sc-green); }
.sc-send:disabled { opacity: .45; cursor: default; }
.sc-send .sc-ic { width: 19px; height: 19px; fill: currentColor; }
.sc-wa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 8px; background: var(--sc-green); color: #fff; font-weight: 700; text-decoration: none; }
.sc-wa:hover { background: #17392b; }
.sc-wa .sc-ic { width: 20px; height: 20px; fill: currentColor; }
.sc-priv { margin: 0; font-size: 10.5px; color: #77776f; text-align: center; }

/* phones: the panel is a full-height sheet; the round button hides while it is open */
@media (max-width: 560px) {
  #sbc-chat { right: 12px; }
  .sc-btn-t { display: none; }
  .sc-btn { width: 46px; padding: 0; }
  #sbc-chat.sc-open { right: 0; left: 0; bottom: var(--sc-lift); top: 0; }
  #sbc-chat.sc-open .sc-btn { display: none; }
  .sc-panel { position: fixed; inset: 0 0 var(--sc-lift) 0; width: auto; height: auto; border-radius: 0; border: 0; z-index: 80; }
}
@media (min-width: 561px) { #sbc-chat { right: 20px; } }
@media print { #sbc-chat { display: none; } }
