/* Floating cart + live chat dock shared by every storefront page. */
.floating-dock {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: Figtree, Helvetica, Arial, sans-serif;
}

.dock-button {
  position: relative;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(33, 29, 24, .12);
  border-radius: 50%;
  background: #fff;
  color: #211d18;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(28, 22, 14, .18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.dock-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(28, 22, 14, .24); }
.dock-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dock-button.dock-chat { background: #211d18; color: #f6efe2; border-color: #211d18; }
.dock-button.dock-chat.is-open { background: #aa7a3e; border-color: #aa7a3e; }

.dock-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #762d27;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.dock-badge[hidden] { display: none; }

.support-panel {
  position: fixed;
  z-index: 201;
  right: 22px;
  bottom: 156px;
  width: 358px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 190px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #f8f4ed;
  box-shadow: 0 24px 60px rgba(24, 18, 10, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  font-family: Figtree, Helvetica, Arial, sans-serif;
}

.support-panel.open { opacity: 1; visibility: visible; transform: none; }

.support-head {
  padding: 16px 18px;
  background: #211d18;
  color: #f6efe2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-head-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #aa7a3e;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.support-head-text { flex: 1; min-width: 0; }
.support-head-text strong { display: block; font-size: 14px; letter-spacing: .04em; }
.support-head-text span { display: block; margin-top: 2px; color: rgba(246, 239, 226, .68); font-size: 11px; }
.support-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: inherit; font-size: 18px; line-height: 1; }

.support-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.support-bubble small { display: block; margin-top: 5px; font-size: 10px; opacity: .6; }
.support-bubble.from-admin { align-self: flex-start; background: #fff; color: #211d18; border: 1px solid rgba(33, 29, 24, .09); border-bottom-left-radius: 4px; }
.support-bubble.from-customer { align-self: flex-end; background: #211d18; color: #f6efe2; border-bottom-right-radius: 4px; }
.support-note { align-self: center; max-width: 90%; color: #746d64; font-size: 11.5px; line-height: 1.55; text-align: center; }

.support-form { border-top: 1px solid rgba(33, 29, 24, .1); background: #fff; padding: 12px 14px 14px; }
.support-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 9px; }
.support-identity[hidden] { display: none; }
.support-form input,
.support-form textarea {
  width: 100%;
  border: 1px solid rgba(33, 29, 24, .16);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: #211d18;
  outline: 0;
  font: 13px Figtree, Helvetica, Arial, sans-serif;
}

.support-form input:focus,
.support-form textarea:focus { border-color: #aa7a3e; }
.support-input-row { display: flex; align-items: flex-end; gap: 9px; }
.support-form textarea { resize: none; min-height: 42px; max-height: 110px; }
.support-send {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #211d18;
  color: #f6efe2;
  display: grid;
  place-items: center;
}

.support-send:disabled { opacity: .45; }
.support-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.support-error { margin: 8px 0 0; min-height: 14px; color: #a2382f; font-size: 11px; }

@media (max-width: 620px) {
  .floating-dock { right: 14px; bottom: 16px; gap: 10px; }
  .dock-button { width: 48px; height: 48px; }
  .support-panel { right: 12px; left: 12px; bottom: 132px; width: auto; max-width: none; height: min(64vh, 460px); max-height: calc(100vh - 160px); }
}
