/* ---- Clear chat (the Service Hub widget, loaded in layouts/base.njk; /assets/js/cr-chat.js routes every
   chat trigger to it and draws the site's own launcher). The widget reads these custom properties through
   its shadow root: the open panel sits in the bottom-right corner; the hub's own launcher never shows here —
   the site's two-faces capsule below is THE launcher. Hidden while the phone menu or the support side panel
   is open (they share the corner). ---- */
[data-shp-chat] {
  --shp-bottom: 20px;
  --shp-side: 20px;
  --shp-panel-inset: 0px;
}

body.menu-open [data-shp-chat],
body.cr-panel-open [data-shp-chat] {
  visibility: hidden;
}

/* ---- The launcher: a frosted capsule with the two Clear team faces, the label, a black go button.
   Built by cr-chat.js once the widget is up; hidden while the chat is open. ---- */
.cr-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147482990; /* under the widget's own panel */
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16), 0 1px 2px rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.35s cubic-bezier(0.16, 0.84, 0.24, 1), transform 0.35s cubic-bezier(0.16, 0.84, 0.24, 1), box-shadow 0.2s, border-color 0.2s;
  -webkit-font-smoothing: antialiased;
}

.cr-chat-launcher.is-in {
  opacity: 1;
  transform: none;
}

.cr-chat-launcher:hover,
.cr-chat-launcher:focus-visible {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  outline: none;
}

.cr-chat-launcher:focus-visible { box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.35), 0 18px 44px rgba(0, 0, 0, 0.2); }

.cr-chat-launcher[hidden] { display: none; }

body.menu-open .cr-chat-launcher,
body.cr-panel-open .cr-chat-launcher { visibility: hidden; }

.cr-chat-launcher__faces {
  display: inline-flex;
  flex: none;
  align-items: center;
}

.cr-chat-launcher__faces img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  border: 2px solid #fff;
  background: #e9e9ee;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.cr-chat-launcher__faces img + img { margin-left: -12px; }

.cr-chat-launcher__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: 4px;
}

.cr-chat-launcher__text strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.cr-chat-launcher__text small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.2;
  color: #6e6e73;
  white-space: nowrap;
}

.cr-chat-launcher__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.22);
}

.cr-chat-launcher__go {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}

.cr-chat-launcher:hover .cr-chat-launcher__go { background: #000; transform: translateX(1px); }

.cr-chat-launcher__go svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media screen and (max-width: 47.99em) {
  [data-shp-chat] {
    --shp-bottom: 16px;
    --shp-side: 16px;
  }
  .cr-chat-launcher {
    right: 16px;
    bottom: 16px;
    gap: 8px;
    padding: 6px 6px 6px 8px;
  }
  .cr-chat-launcher__text strong { font-size: 13px; }
  .cr-chat-launcher__text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cr-chat-launcher { transition: none; }
}

/* ---- "Questions about Clear UV?" card under the buy box on product pages (store/product.njk): the two
   faces, one line, an arrow — opens the chat (it already reads the page). ---- */
.cr-help-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1rem 0 0;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 0.84, 0.24, 1), border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.cr-help-cta:hover,
.cr-help-cta:focus-visible {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  text-decoration: none;
  outline: none;
}

.cr-help-cta__faces {
  display: inline-flex;
  flex: none;
  align-items: center;
}

.cr-help-cta__faces img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  border: 2px solid #fff;
  background: #e9e9ee;
}

.cr-help-cta__faces img + img { margin-left: -12px; }

.cr-help-cta__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.cr-help-cta__text strong {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cr-help-cta__text small {
  font-size: 0.8125rem;
  line-height: 1.3;
  color: #6e6e73;
}

.cr-help-cta__arrow {
  flex: none;
  color: #0071e3;
  font-weight: 600;
}

/* ---- The support side panel's chat card (components/support-panel.njk): a button in the card's clothes,
   the two faces in the icon slot. ---- */
.support-card--chat {
  width: 100%;
  margin: 0;
  border: 1px solid transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: #1d1d1f;
  color: #fff;
}

.support-card--chat:hover,
.support-card--chat:focus-visible {
  background: #000;
  border-color: #000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  outline: none;
}

.support-card--chat h4 { color: #fff; }

.support-card--chat p { color: rgba(255, 255, 255, 0.72); }

.support-card--chat .support-card-arrow { color: rgba(255, 255, 255, 0.8); }

.support-card-icon--faces {
  width: auto;
  min-width: 44px;
  background: transparent;
  box-shadow: none;
  padding: 0 4px;
}

.support-card-icon--faces img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  border: 2px solid #1d1d1f;
  background: #e9e9ee;
}

.support-card-icon--faces img + img { margin-left: -10px; }

.support-card--chat .support-card-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.support-card--chat .support-card-online::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.25);
}

/* the drawer's bottom card (components/header.njk .talk-to-expert) shows the faces too */
.talk-to-expert-icon--faces {
  display: inline-flex;
  align-items: center;
  background: transparent !important;
  width: auto !important;
}

.talk-to-expert-icon--faces img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  border: 2px solid #fff;
  background: #e9e9ee;
}

.talk-to-expert-icon--faces img + img { margin-left: -10px; }
