:root {
  --bc-chat-accent: #fb7f68;
  --bc-chat-accent-dark: #dc6651;
  --bc-chat-ivory: #fffaf6;
  --bc-chat-cream: #fcf2ec;
  --bc-chat-text: #2f2a24;
  --bc-chat-muted: #75685d;
  --bc-chat-border: rgba(88, 68, 52, .14);
  --bc-chat-shadow: 0 18px 44px rgba(47, 42, 36, .18);
}

.bc-gift-helper {
  position: fixed;
  z-index: 2147482900;
  color: var(--bc-chat-text);
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  line-height: 1.35;
}

.bc-gift-helper * {
  box-sizing: border-box;
}

.bc-gift-helper button,
.bc-gift-helper input {
  font: inherit;
}

.bc-gh-launcher {
  position: fixed;
  right: 0;
  top: var(--bc-gh-desktop-top, 56%);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 65px;
  border: 0;
  border-radius: 999px 0 0 999px;
  padding: 10px 18px 10px 11px;
  background: var(--bc-chat-accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(137, 80, 64, .28);
  cursor: pointer;
  transition: width .22s ease, padding .22s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.bc-gh-launcher:hover,
.bc-gh-launcher:focus-visible {
  background: var(--bc-chat-accent-dark);
  box-shadow: 0 12px 28px rgba(137, 80, 64, .34);
}

.bc-gh-launcher-icon,
.bc-gh-avatar {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .95);
  color: var(--bc-chat-accent);
}

.bc-gh-launcher-icon svg,
.bc-gh-avatar svg {
  width: 26px;
  height: 26px;
}

.bc-gh-launcher-icon svg {
  transform-origin: 50% 72%;
}

.bc-gift-helper.is-intro:not(.is-collapsed):not(.is-open) .bc-gh-launcher-icon svg {
  animation: bc-gh-gift-nudge 4.8s ease-in-out 1.2s infinite;
}

.bc-gh-launcher-text {
  display: block;
  width: 139px;
  max-width: 34vw;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.12;
  text-align: left;
  overflow: hidden;
  transition: width .22s ease, opacity .16s ease, margin .22s ease;
}

.bc-gh-launcher-arrow {
  font-size: 20px;
  line-height: 1;
  opacity: .92;
}

.bc-gift-helper.is-collapsed .bc-gh-launcher {
  width: 72px;
  height: 72px;
  min-height: 72px;
  padding: 11px 11px 11px 12px;
  border-radius: 999px 0 0 999px;
}

.bc-gift-helper.is-collapsed .bc-gh-launcher-text,
.bc-gift-helper.is-collapsed .bc-gh-launcher-arrow {
  width: 0;
  opacity: 0;
  margin: 0;
}

@media (hover: hover) and (pointer: fine) {
  .bc-gift-helper.is-collapsed:not(.is-open) .bc-gh-launcher:hover,
  .bc-gift-helper.is-collapsed:not(.is-open) .bc-gh-launcher:focus-visible {
    width: 223px;
    padding: 10px 18px 10px 11px;
  }

  .bc-gift-helper.is-collapsed:not(.is-open) .bc-gh-launcher:hover .bc-gh-launcher-text,
  .bc-gift-helper.is-collapsed:not(.is-open) .bc-gh-launcher:focus-visible .bc-gh-launcher-text {
    width: 139px;
    opacity: 1;
  }

  .bc-gift-helper.is-collapsed:not(.is-open) .bc-gh-launcher:hover .bc-gh-launcher-arrow,
  .bc-gift-helper.is-collapsed:not(.is-open) .bc-gh-launcher:focus-visible .bc-gh-launcher-arrow {
    width: auto;
    opacity: .92;
  }
}

@keyframes bc-gh-gift-nudge {
  0%, 82%, 100% {
    transform: rotate(0deg) translateY(0);
  }
  86% {
    transform: rotate(-4deg) translateY(-1px);
  }
  90% {
    transform: rotate(4deg) translateY(0);
  }
  94% {
    transform: rotate(-2deg) translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-gift-helper.is-intro:not(.is-collapsed):not(.is-open) .bc-gh-launcher-icon svg {
    animation: none;
  }
}

.bc-gh-panel {
  position: fixed;
  right: 20px;
  top: 52%;
  width: min(392px, calc(100vw - 40px));
  height: min(610px, calc(100vh - 76px));
  display: none;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--bc-chat-border);
  border-radius: 22px;
  background: rgba(255, 250, 246, .98);
  box-shadow: var(--bc-chat-shadow);
  transform: translateY(-50%);
}

.bc-gift-helper.is-open .bc-gh-panel {
  display: grid;
}

.bc-gift-helper.is-open .bc-gh-launcher {
  display: none;
}

.bc-gh-close-float {
  position: fixed;
  right: 20px;
  top: calc(52% + min(305px, 50vh - 38px) + 12px);
  width: 46px;
  height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--bc-chat-accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(137, 80, 64, .28);
  cursor: pointer;
}

.bc-gift-helper.is-open .bc-gh-close-float {
  display: flex;
}

.bc-gh-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 17px 18px 14px;
  border-bottom: 1px solid rgba(88, 68, 52, .09);
  background: linear-gradient(180deg, #fffaf6 0%, #fcf2ec 100%);
}

.bc-gh-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
}

.bc-gh-subhead {
  margin: 3px 0 0;
  color: var(--bc-chat-muted);
  font-size: 12px;
}

.bc-gh-close {
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bc-chat-text);
  cursor: pointer;
}

.bc-gh-close:hover,
.bc-gh-close:focus-visible {
  background: rgba(251, 127, 104, .12);
}

.bc-gh-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 14px;
  background: #fffdfb;
}

.bc-gh-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.bc-gh-row.user {
  justify-content: flex-end;
}

.bc-gh-mini-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--bc-chat-accent);
}

.bc-gh-bubble {
  max-width: 82%;
  padding: 11px 13px;
  border-radius: 14px;
  background: #f7efeb;
  color: var(--bc-chat-text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bc-gh-row.user .bc-gh-bubble {
  background: var(--bc-chat-accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.bc-gh-product-list {
  display: grid;
  gap: 9px;
  margin: -4px 0 14px 30px;
  width: min(318px, calc(100% - 30px));
}

.bc-gh-product-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(88, 68, 52, .13);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(47, 42, 36, .06);
}

.bc-gh-product-image {
  width: 76px;
  height: 100%;
  min-height: 98px;
  object-fit: cover;
  background: #f7efeb;
}

.bc-gh-product-body {
  min-width: 0;
  padding: 10px 10px 10px 0;
}

.bc-gh-product-title {
  color: var(--bc-chat-text);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  line-height: 1.14;
  font-weight: 500;
}

.bc-gh-product-price {
  margin-top: 3px;
  color: var(--bc-chat-accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.bc-gh-product-reason {
  margin: 6px 0 8px;
  color: var(--bc-chat-muted);
  font-size: 12px;
  line-height: 1.35;
}

.bc-gh-product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--bc-chat-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.bc-gh-product-link:hover,
.bc-gh-product-link:focus-visible {
  background: var(--bc-chat-accent-dark);
}

.bc-gh-time {
  margin: -6px 0 18px 31px;
  color: rgba(47, 42, 36, .45);
  font-size: 11px;
}

.bc-gh-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 16px 30px;
  padding: 0;
  background: transparent;
}

.bc-gh-quick {
  min-height: 34px;
  border: 1px solid rgba(251, 127, 104, .55);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fffdfb;
  color: var(--bc-chat-accent-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bc-gh-quick:hover,
.bc-gh-quick:focus-visible {
  background: rgba(251, 127, 104, .09);
}

.bc-gh-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(88, 68, 52, .1);
  background: var(--bc-chat-ivory);
}

.bc-gh-input {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 1px solid rgba(88, 68, 52, .16);
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  color: var(--bc-chat-text);
  font-size: 13px;
  outline: none;
}

.bc-gh-input:focus {
  border-color: var(--bc-chat-accent);
  box-shadow: 0 0 0 3px rgba(251, 127, 104, .16);
}

.bc-gh-send {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(88, 68, 52, .16);
  border-radius: 9px;
  background: #fff;
  color: var(--bc-chat-text);
  cursor: pointer;
}

.bc-gh-send:hover,
.bc-gh-send:focus-visible {
  color: #fff;
  background: var(--bc-chat-accent);
  border-color: var(--bc-chat-accent);
}

.bc-gh-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-width: 42px;
}

.bc-gh-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(47, 42, 36, .48);
  animation: bcGhTyping 1s infinite ease-in-out;
}

.bc-gh-typing span:nth-child(2) { animation-delay: .15s; }
.bc-gh-typing span:nth-child(3) { animation-delay: .3s; }

@keyframes bcGhTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

@media (max-width: 749px) {
  .bc-gh-launcher {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(18px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    border-radius: 999px;
    min-height: 62px;
    padding: 9px 14px 9px 9px;
    max-width: calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }

  .bc-gh-launcher-text {
    width: 115px;
    max-width: calc(100vw - 112px);
    font-size: 13px;
  }

  .bc-gift-helper.is-collapsed .bc-gh-launcher {
    left: auto;
    right: 16px;
    right: calc(16px + env(safe-area-inset-right));
    transform: none;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    padding: 11px;
  }

  .bc-gh-panel {
    left: calc(12px + env(safe-area-inset-left));
    right: calc(12px + env(safe-area-inset-right));
    top: calc(12px + env(safe-area-inset-top));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    max-height: calc(var(--bc-gh-visual-vh, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
    border-radius: 22px 22px 18px 18px;
    transform: none;
  }

  .bc-gh-messages {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .bc-gh-form {
    flex-shrink: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .bc-gift-helper.is-open .bc-gh-close-float {
    display: none;
  }

  .bc-gh-header {
    padding: 15px 14px 13px;
  }

  .bc-gh-title {
    font-size: 18px;
  }

  .bc-gh-bubble {
    max-width: 86%;
    font-size: 13px;
  }

  .bc-gh-quick-replies {
    gap: 8px;
  }

  .bc-gh-quick {
    min-height: 33px;
    padding: 7px 12px;
    font-size: 11px;
  }

  .bc-gh-product-list {
    margin-left: 30px;
    width: calc(100% - 30px);
  }

  .bc-gh-product-card {
    grid-template-columns: 72px 1fr;
  }

  .bc-gh-product-image {
    width: 72px;
    min-height: 104px;
  }
}
