/* Shop With Me - storefront styles.
   Everything is scoped under .swm so nothing bleeds into the host theme (framework 5.2).
   Petal palette (5.1.1), logical properties for RTL (5.3.4), 44px tap targets (5.3.5). */

.swm {
  --swm-orange: #F26A1F;
  --swm-orange-2: #F4A024;
  --swm-blue: #1FA2F2;
  --swm-purple: #9A2BB0;
  --swm-green: #2FBA5B;
  --swm-danger: #E53935;
  --swm-ink: #0F0F12;
  --swm-ink-2: #1A1A20;
  --swm-text: #1a1a1a;
  --swm-muted: #6b7280;
  --swm-bg: #FFFFFF;
  --swm-card: #F7F8FA;
  --swm-border: rgba(0,0,0,.08);
  --swm-radius: 16px;
  --swm-shadow: 0 8px 24px rgba(0,0,0,.08);
  --swm-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --swm-z: 2147483000;
  font-family: var(--swm-font);
  color: var(--swm-text);
  box-sizing: border-box;
  line-height: 1.5;
}
.swm *, .swm *::before, .swm *::after { box-sizing: border-box; }
.swm.swm-rtl, .swm-rtl.swm { font-family: Tahoma, system-ui, sans-serif; }
.swm [hidden] { display: none !important; }
.swm-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.swm button, .swm a { font-family: inherit; }
.swm :focus-visible { outline: 3px solid var(--swm-blue); outline-offset: 2px; }

/* ---------- pages ---------- */
.swm-page { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; }
.swm-page-narrow { max-width: 560px; }
.swm-hero { text-align: center; padding: 20px 0 24px; }
.swm-logo { position: relative; width: 72px; height: 72px; margin: 0 auto 14px; background: var(--swm-ink); border-radius: 18px; }
.swm-petal { position: absolute; width: 42%; height: 42%; border-radius: 50% 50% 50% 8px; }
.swm-p1 { top: 10%; left: 10%; background: var(--swm-orange); transform: rotate(-45deg); }
.swm-p2 { top: 10%; right: 10%; background: var(--swm-blue); transform: rotate(45deg); }
.swm-p3 { bottom: 10%; left: 10%; background: var(--swm-purple); transform: rotate(-135deg); }
.swm-p4 { bottom: 10%; right: 10%; background: var(--swm-green); transform: rotate(135deg); }
.swm-title { font-size: 32px; font-weight: 800; letter-spacing: .5px; margin: 0 0 6px;
  background: linear-gradient(90deg, var(--swm-orange), var(--swm-purple), var(--swm-blue), var(--swm-green));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.swm-subtitle { margin: 0; color: var(--swm-muted); font-size: 16px; }
.swm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 767px) { .swm-grid { grid-template-columns: 1fr; } .swm-title { font-size: 26px; } }
.swm-card { background: var(--swm-bg); border: 1px solid var(--swm-border); border-radius: var(--swm-radius); padding: 22px; box-shadow: 0 8px 20px rgba(0,0,0,.04); }
.swm-card-center { text-align: center; max-width: 560px; margin: 0 auto; }
.swm-card-title { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--swm-muted); margin: 0 0 14px; }
.swm-lead { font-size: 17px; margin: 0 0 16px; }
.swm-muted { color: var(--swm-muted); }
.swm-small { font-size: 12.5px; }
.swm-error { color: var(--swm-danger); font-weight: 600; font-size: 17px; margin: 0 0 18px; }
.swm-steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swm-steps li { background: var(--swm-card); border-radius: 12px; padding: 12px 8px; font-size: 13px; font-weight: 600; }
.swm-step-num { display: block; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: linear-gradient(135deg, var(--swm-orange), var(--swm-orange-2)); color: #fff; line-height: 28px; font-weight: 800; }
@media (max-width: 480px) { .swm-steps { grid-template-columns: repeat(2, 1fr); } }
.swm-facts { display: grid; gap: 8px; margin: 0 0 18px; text-align: start; }
.swm-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--swm-card); border-radius: 10px; }
.swm-facts dt { color: var(--swm-muted); font-weight: 600; margin: 0; }
.swm-facts dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */
.swm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.swm-btn:hover { transform: translateY(-1px); text-decoration: none; }
.swm-btn-lg { padding: 14px 28px; font-size: 16px; }
.swm-btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.swm-btn-primary { background: linear-gradient(90deg, var(--swm-orange), var(--swm-orange-2)); color: #fff; box-shadow: 0 6px 16px rgba(242,106,31,.3); }
.swm-btn-secondary { background: transparent; border-color: var(--swm-blue); color: var(--swm-blue); }
.swm-btn-ghost { background: transparent; color: var(--swm-muted); }
.swm-btn-ghost:hover { background: rgba(0,0,0,.05); }
.swm-btn-danger { background: var(--swm-danger); color: #fff; }
.swm-btn-success { background: var(--swm-green); color: #fff; }
.swm-btn[disabled], .swm-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.swm-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin-top: 18px; }
.swm-actions-stack { flex-direction: column; }
.swm-actions-stack .swm-btn { width: 100%; max-width: 360px; }
.swm-inline-form { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- share ---------- */
.swm-share-row { display: flex; gap: 8px; margin-bottom: 12px; }
.swm-share-input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--swm-border); border-radius: 12px; font-family: Consolas, Menlo, monospace; font-size: 13px; background: var(--swm-card); color: var(--swm-text); }
.swm-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.swm-share { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; text-decoration: none; border: 1px solid var(--swm-border); background: var(--swm-bg); color: var(--swm-text); cursor: pointer; }
.swm-share:hover { text-decoration: none; box-shadow: var(--swm-shadow); }
.swm-share-whatsapp { border-color: #25D366; color: #128C7E; }
.swm-share-messenger { border-color: #0084FF; color: #0084FF; }
.swm-share-sms { border-color: var(--swm-purple); color: var(--swm-purple); }
.swm-share-email { border-color: var(--swm-orange); color: var(--swm-orange); }
.swm-share-qr { border-color: var(--swm-ink); color: var(--swm-ink); }
.swm-qr { text-align: center; margin: 14px 0; }
.swm-qr img { border: 1px solid var(--swm-border); border-radius: 12px; padding: 8px; background: #fff; max-width: 100%; height: auto; }
@media (max-width: 480px) { .swm-share-row { flex-direction: column; } }

/* ---------- participants ---------- */
.swm-participants { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.swm-participant { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--swm-card); }
.swm-participant-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swm-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--swm-blue), var(--swm-purple)); color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.swm-avatar-inline { width: 26px; height: 26px; font-size: 12px; }
.swm-presence { font-size: 12px; color: var(--swm-muted); display: inline-flex; align-items: center; gap: 5px; }
.swm-presence::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c4c4c4; }
.swm-online .swm-presence::before, .swm-presence.swm-online::before { background: var(--swm-green); }
.swm-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .4px; }
.swm-badge-controller { background: rgba(244,160,36,.18); color: #9a5b00; }
.swm-badge-host { background: rgba(31,162,242,.14); color: #0f6fa8; }
.swm-badge-observer { background: rgba(89,89,89,.12); color: #595959; }
.swm-waiting { display: flex; align-items: center; gap: 8px; color: var(--swm-muted); font-style: italic; }
.swm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--swm-orange); animation: swm-pulse 1.4s ease-in-out infinite; }
@keyframes swm-pulse { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }

/* ---------- inline / floating start button ---------- */
.swm-inline-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: linear-gradient(90deg, #F26A1F, #F4A024); color: #fff !important; font-weight: 700; font-size: 13px; text-decoration: none !important; line-height: 1.2; min-height: 34px; vertical-align: middle; font-family: var(--swm-font); }
.swm-inline-btn:hover { box-shadow: 0 6px 16px rgba(242,106,31,.3); }
.swm-fab { position: fixed; z-index: var(--swm-z); bottom: 20px; inset-inline-end: 20px; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 999px; background: linear-gradient(90deg, #F26A1F, #F4A024); color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none !important; box-shadow: 0 10px 24px rgba(242,106,31,.35); }
.swm-fab:hover { transform: translateY(-2px); }
@media (max-width: 480px) { .swm-fab-text { display: none; } .swm-fab { padding: 12px; width: 52px; height: 52px; justify-content: center; } }

/* ---------- floating session panel ---------- */
.swm-panel { position: fixed; z-index: var(--swm-z); bottom: 20px; inset-inline-end: 20px; width: 340px; max-width: calc(100vw - 24px); background: var(--swm-bg); color: var(--swm-text); border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.18); border: 1px solid var(--swm-border); overflow: hidden; display: flex; flex-direction: column; max-height: min(80vh, 640px); }
.swm-panel-collapsed { width: auto; max-height: none; border-radius: 999px; }
.swm-panel-collapsed .swm-panel-head { padding-inline: 12px 6px; }
.swm-panel-collapsed .swm-panel-title { max-width: 150px; }
.swm-panel-collapsed .swm-panel-toggle svg { transform: rotate(180deg); }
.swm-panel-collapsed .swm-panel-body, .swm-panel-collapsed .swm-panel-footer { display: none; }
.swm-panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--swm-ink), var(--swm-ink-2)); color: #fff; cursor: pointer; min-height: 52px; }
.swm-panel-head:focus-visible { outline-offset: -3px; }
.swm-panel-icon { position: relative; width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.swm-panel-title-wrap { flex: 1; min-width: 0; }
.swm-panel-title { font-weight: 800; letter-spacing: .3px; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swm-panel-count { font-size: 12px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 6px; }
.swm-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #c4c4c4; flex: none; }
.swm-status-dot.swm-connected { background: var(--swm-green); box-shadow: 0 0 0 3px rgba(47,186,91,.25); }
.swm-status-dot.swm-connecting { background: var(--swm-orange-2); animation: swm-pulse 1.2s ease-in-out infinite; }
.swm-status-dot.swm-disconnected { background: var(--swm-danger); }
.swm-panel-toggle { background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.swm-panel-toggle:hover { background: rgba(255,255,255,.12); }
.swm-panel-body { padding: 12px 14px; overflow: auto; display: grid; gap: 12px; }
.swm-role-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 13.5px; }
.swm-role-controller { background: rgba(244,160,36,.16); color: #8a4b00; }
.swm-role-observer { background: rgba(31,162,242,.12); color: #0f6fa8; }
.swm-role-private { background: rgba(154,43,176,.12); color: #6e1a80; }
.swm-panel .swm-participants { margin: 0; }
.swm-panel .swm-participant { padding: 6px 8px; }
.swm-panel .swm-avatar { width: 30px; height: 30px; font-size: 12px; }
.swm-mic { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--swm-muted); flex: none; }
.swm-mic.swm-speaking { color: var(--swm-green); box-shadow: 0 0 0 3px rgba(47,186,91,.25); background: rgba(47,186,91,.12); }
.swm-mic.swm-muted-icon { color: var(--swm-danger); }
.swm-mic.swm-off { opacity: .35; }
.swm-give-btn { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.swm-panel-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swm-panel-row .swm-btn { flex: 1; min-width: 0; }
.swm-panel .swm-btn { min-height: 42px; padding: 8px 14px; font-size: 13.5px; }
.swm-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--swm-card); font-size: 13.5px; font-weight: 600; }
.swm-switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #cfd4da; border: 0; cursor: pointer; flex: none; transition: background .2s ease; }
.swm-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.swm-switch[aria-checked="true"] { background: var(--swm-green); }
.swm-switch[aria-checked="true"]::after { transform: translateX(18px); }
.swm-rtl .swm-switch[aria-checked="true"]::after { transform: translateX(-18px); }
.swm-voice-status { font-size: 12.5px; color: var(--swm-muted); }
.swm-panel-footer { padding: 10px 14px 14px; border-top: 1px solid var(--swm-border); display: grid; gap: 8px; }
.swm-cart { display: grid; gap: 6px; }
.swm-cart-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--swm-muted); }
.swm-cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 180px; overflow: auto; }
.swm-cart-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.swm-cart-item img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; flex: none; background: var(--swm-card); }
.swm-cart-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.swm-cart-name a { color: inherit; text-decoration: none; }
.swm-cart-qty { color: var(--swm-muted); flex: none; }
.swm-cart-remove { background: transparent; border: 0; color: var(--swm-danger); cursor: pointer; width: 32px; height: 32px; border-radius: 50%; flex: none; font-size: 16px; }
.swm-cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; }
.swm-empty { color: var(--swm-muted); font-size: 13px; }

/* ---------- toasts / prompts / overlays ---------- */
.swm-toasts { position: fixed; z-index: var(--swm-z); top: 16px; inset-inline-end: 16px; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.swm-toast { pointer-events: auto; background: var(--swm-ink); color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: var(--swm-shadow); font-size: 13.5px; display: flex; gap: 10px; align-items: center; animation: swm-slide .25s ease; }
.swm-toast-success { background: #1F7A3F; }
.swm-toast-danger { background: var(--swm-danger); }
.swm-toast-info { background: #0f6fa8; }
@keyframes swm-slide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.swm-prompt { position: fixed; z-index: calc(var(--swm-z) + 1); bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--swm-bg); color: var(--swm-text); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.25); padding: 16px 18px; width: min(420px, calc(100vw - 24px)); border: 1px solid var(--swm-border); }
.swm-rtl .swm-prompt { transform: translateX(50%); }
.swm-prompt-text { font-weight: 600; margin: 0 0 12px; }
.swm-prompt-actions { display: flex; gap: 8px; justify-content: flex-end; }
.swm-modal-backdrop { position: fixed; inset: 0; z-index: calc(var(--swm-z) + 2); background: rgba(15,15,18,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.swm-modal { background: var(--swm-bg); color: var(--swm-text); border-radius: 18px; padding: 24px; width: min(440px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.swm-modal h2 { margin: 0 0 8px; font-size: 20px; }
.swm-modal p { margin: 0 0 18px; color: var(--swm-muted); }
.swm-lock-bar { position: fixed; z-index: calc(var(--swm-z) - 1); top: 0; inset-inline: 0; height: 4px; background: linear-gradient(90deg, var(--swm-blue), var(--swm-purple)); pointer-events: none; }
body.swm-observing .swm-lockable { cursor: not-allowed; }

/* ---------- mobile: bottom sheet ---------- */
@media (max-width: 640px) {
  .swm-panel { inset-inline: 8px; bottom: 8px; width: auto; max-width: none; max-height: 70vh; border-radius: 16px; }
  .swm-panel-collapsed { inset-inline-start: auto; inset-inline-end: 12px; bottom: 12px; width: auto; }
  .swm-toasts { top: 8px; inset-inline: 8px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .swm *, .swm *::before, .swm *::after { animation: none !important; transition: none !important; } }

/* ---------- 1.2: live presence ---------- */
.swm-panel { animation: swm-panel-in .28s ease both; }
@keyframes swm-panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.swm-panel-toggle svg { transition: transform .2s ease; }

/* faces + unread badge: what the pill shows while the panel is minimised */
.swm-head-faces { display: none; align-items: center; flex: none; }
.swm-panel-collapsed .swm-head-faces { display: inline-flex; }
.swm-face { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; margin-inline-start: -6px; background: linear-gradient(135deg, var(--swm-blue), var(--swm-purple)); color: #fff; font-size: 11px; font-weight: 800; border: 2px solid var(--swm-ink); opacity: .55; }
.swm-face:first-child { margin-inline-start: 0; }
.swm-face.swm-online { opacity: 1; }
.swm-face-more { background: #3a3a44; font-size: 10px; opacity: 1; }
.swm-unread { position: absolute; top: -5px; inset-inline-end: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--swm-danger); color: #fff; font-size: 10px; font-weight: 800; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--swm-ink); }

/* role banner: "opening a page" + what the controller is looking at */
.swm-role-opening { background: rgba(47,186,91,.14); color: #1F7A3F; }
.swm-viewing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--swm-muted); margin-top: -4px; }
.swm-viewing-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swm-viewing-go { flex: none; font-weight: 700; color: var(--swm-blue); text-decoration: none; padding: 4px 10px; border: 1px solid var(--swm-blue); border-radius: 999px; }
.swm-viewing-go:hover { background: rgba(31,162,242,.1); text-decoration: none; }

/* participants: who is talking, who is away */
.swm-participant.swm-offline { opacity: .6; }
.swm-participant.swm-is-speaking .swm-avatar { box-shadow: 0 0 0 3px rgba(47,186,91,.45); }

/* reactions */
.swm-reactions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: space-between; padding: 4px 6px; border-radius: 12px; background: var(--swm-card); }
.swm-reaction { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 19px; line-height: 1; cursor: pointer; transition: transform .12s ease, background .15s ease; }
.swm-reaction:hover { background: rgba(0,0,0,.07); transform: scale(1.18); }
.swm-reaction:active { transform: scale(.92); }
.swm-float { position: fixed; z-index: calc(var(--swm-z) + 1); bottom: 90px; inset-inline-end: var(--swm-float-x, 40px); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; animation: swm-rise 2.2s ease-out forwards; }
.swm-float-emoji { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.swm-float-name { font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(15,15,18,.78); padding: 2px 8px; border-radius: 999px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes swm-rise { 0% { opacity: 0; transform: translateY(20px) scale(.6); } 12% { opacity: 1; transform: translateY(0) scale(1.1); } 22% { transform: translateY(-14px) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-190px) scale(1); } }

/* where the controller clicked */
.swm-ripple { position: absolute; z-index: calc(var(--swm-z) - 2); width: 0; height: 0; pointer-events: none; }
.swm-ripple::before, .swm-ripple::after { content: ""; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; }
.swm-ripple::before { background: rgba(242,106,31,.35); animation: swm-tap .9s ease-out forwards; }
.swm-ripple::after { border: 3px solid var(--swm-orange); animation: swm-ring .9s ease-out forwards; }
@keyframes swm-tap { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes swm-ring { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }

/* following the controller to another page */
.swm-lock-bar-busy { background: linear-gradient(90deg, var(--swm-blue), var(--swm-purple), var(--swm-orange), var(--swm-blue)); background-size: 200% 100%; animation: swm-busy 1s linear infinite; }
@keyframes swm-busy { from { background-position: 0 0; } to { background-position: -200% 0; } }

@media (max-width: 640px) {
  .swm-panel-collapsed .swm-panel-title-wrap { display: none; }
  .swm-panel-collapsed .swm-panel-head { min-height: 48px; }
  .swm-float { bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .swm-float, .swm-ripple::before, .swm-ripple::after, .swm-lock-bar-busy, .swm-panel { animation-duration: .01s !important; }
}

/* panel layout fixes: nothing may widen the panel body */
.swm-panel-body { overflow-x: hidden; }
.swm-panel-body > * { min-width: 0; }
.swm-participant-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.swm-participant-main .swm-participant-name { flex: none; }
.swm-participant-meta { font-size: 11.5px; color: var(--swm-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swm-is-controller .swm-participant-meta { color: #9a5b00; }
.swm-is-controller .swm-avatar { background: linear-gradient(135deg, var(--swm-orange), var(--swm-orange-2)); }
.swm-reactions { flex-wrap: nowrap; gap: 2px; }
.swm-reaction { flex: 1 1 0; min-width: 0; width: auto; height: 34px; font-size: 18px; }
.swm-cart-list { overflow-x: hidden; }

/* ---------- 1.3: placement (where the floating button / session panel sits) ----------
   The store chooses a corner or the middle of a side (swm-pos-xx) and the distances from the edges
   (--swm-ox / --swm-oy on desktop, --swm-mox / --swm-moy on phones, set inline by the server).
   --swm-sx / --swm-sy are set by shop-with-me-placement.js to step around other floating widgets. */
.swm-fab, .swm-panel { --swm-x: var(--swm-ox, 20px); --swm-y: var(--swm-oy, 20px); --swm-sx: 0px; --swm-sy: 0px; }
.swm-fab { transition: top .25s ease, bottom .25s ease, left .25s ease, right .25s ease, box-shadow .2s ease; }
.swm-panel { transition: top .25s ease, bottom .25s ease, left .25s ease, right .25s ease; }
@media (max-width: 640px) {
  .swm-fab, .swm-panel { --swm-x: var(--swm-mox, 12px); --swm-y: var(--swm-moy, 12px); }
}
.swm-fab.swm-pos-br, .swm-panel.swm-pos-br { inset: auto calc(var(--swm-x) + var(--swm-sx)) calc(var(--swm-y) + var(--swm-sy)) auto; }
.swm-fab.swm-pos-bl, .swm-panel.swm-pos-bl { inset: auto auto calc(var(--swm-y) + var(--swm-sy)) calc(var(--swm-x) + var(--swm-sx)); }
.swm-fab.swm-pos-tr, .swm-panel.swm-pos-tr { inset: calc(var(--swm-y) + var(--swm-sy)) calc(var(--swm-x) + var(--swm-sx)) auto auto; }
.swm-fab.swm-pos-tl, .swm-panel.swm-pos-tl { inset: calc(var(--swm-y) + var(--swm-sy)) auto auto calc(var(--swm-x) + var(--swm-sx)); }
.swm-fab.swm-pos-mr, .swm-panel.swm-pos-mr { inset: calc(50% + var(--swm-sy)) calc(var(--swm-x) + var(--swm-sx)) auto auto; translate: 0 -50%; }
.swm-fab.swm-pos-ml, .swm-panel.swm-pos-ml { inset: calc(50% + var(--swm-sy)) auto auto calc(var(--swm-x) + var(--swm-sx)); translate: 0 -50%; }
/* never taller than the room that is left above / below the place it was moved to */
.swm-panel.swm-pos-br, .swm-panel.swm-pos-bl, .swm-panel.swm-pos-tr, .swm-panel.swm-pos-tl { max-height: min(80vh, 640px, calc(100vh - var(--swm-y) - var(--swm-sy) - 12px)); }
.swm-panel.swm-panel-collapsed { max-height: none; }

/* icon-only start button */
.swm-fab-compact .swm-fab-text { display: none; }
.swm-fab.swm-fab-compact { padding: 12px; width: 52px; height: 52px; justify-content: center; }

@media (max-width: 640px) {
  .swm-hide-mobile { display: none !important; }
  /* the open panel is a sheet across the bottom on phones, wherever the pill sits */
  .swm-panel:not(.swm-panel-collapsed) { inset: auto 8px 8px 8px; translate: none; width: auto; max-width: none; max-height: 70vh; }
}

/* toasts keep clear of the panel: same side, other end of the screen when the panel is at the top */
.swm-toasts.swm-toasts-left { inset-inline: auto; left: 16px; right: auto; }
.swm-toasts.swm-toasts-right { inset-inline: auto; right: 16px; left: auto; }
.swm-toasts.swm-toasts-bottom { top: auto; bottom: 16px; }
@media (max-width: 640px) {
  .swm-toasts.swm-toasts-left, .swm-toasts.swm-toasts-right { left: 8px; right: 8px; }
  .swm-toasts.swm-toasts-bottom { bottom: 8px; }
}

/* ---------- inline start button inside the page (zones picked in Settings > Placement) ----------
   Doubled class: themes style every link of the header / menus (line-height, display, case); the button keeps its
   own shape wherever it is placed. */
a.swm-inline-btn.swm-inline-btn { display: inline-flex; align-items: center; gap: 6px; height: auto; min-height: 34px; padding: 6px 14px; margin: 0; line-height: 1.2; font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0; white-space: nowrap; border-radius: 999px; border: 0; background: linear-gradient(90deg, #F26A1F, #F4A024); color: #fff; text-decoration: none; }
a.swm-inline-btn.swm-inline-btn:hover { color: #fff; box-shadow: 0 6px 16px rgba(242,106,31,.3); }
.swm-inline-wrap.swm-inline-li { display: inline-block; vertical-align: middle; list-style: none; margin-inline-start: 8px; }
.swm-inline-wrap.swm-inline-span { display: inline-block; vertical-align: middle; margin: 6px 0; }
.swm-inline-wrap.swm-inline-div { display: block; margin: 12px 0; text-align: center; }
.swm-inline-wrap.swm-zone-footer { margin: 16px 0; }
a.swm-inline-btn.swm-inline-btn > span { display: inline-flex; align-items: center; line-height: 1.2; font-size: inherit; text-transform: inherit; padding: 0; margin: 0; }
