.rwp-customer-assistant {
  --rwp-green: #008037;
  --rwp-green-2: #13b85f;
  --rwp-red: #e92b24;
  --rwp-ink: #161616;
  --rwp-muted: #6b6b6b;
  --rwp-border: rgba(0, 0, 0, 0.12);
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 99990;
  font-family: inherit;
}

.rwp-customer-assistant * {
  box-sizing: border-box;
}

.rwp-customer-assistant__bubble {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle at 35% 25%, #33df7e, var(--rwp-green) 62%, #005727 100%);
  box-shadow: 0 18px 42px rgba(0, 128, 55, 0.36), 0 0 0 8px rgba(0, 128, 55, 0.12);
  display: grid;
  place-items: center;
  position: relative;
  font-weight: 900;
  letter-spacing: 0;
}

.rwp-customer-assistant__bubble::before,
.rwp-customer-assistant__bubble::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  border: 2px solid rgba(0, 128, 55, 0.28);
  animation: rwp-customer-heartbeat 2.2s ease-out infinite;
  pointer-events: none;
}

.rwp-customer-assistant__bubble::after {
  inset: -17px;
  animation-delay: 0.55s;
  border-color: rgba(0, 128, 55, 0.16);
}

.rwp-customer-assistant__bubble:hover,
.rwp-customer-assistant__bubble:focus-visible {
  transform: translateY(-1px);
  outline: 3px solid rgba(233, 43, 36, 0.22);
}

.rwp-customer-assistant__bubble-icon {
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.rwp-customer-assistant__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-weight: 950;
  letter-spacing: 0;
}

.rwp-customer-assistant__brand-m {
  color: var(--rwp-green);
}

.rwp-customer-assistant__brand-i {
  color: #fff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    1px 0 0 rgba(0, 0, 0, 0.35),
    -1px 0 0 rgba(0, 0, 0, 0.25);
}

.rwp-customer-assistant__brand-o {
  color: var(--rwp-red);
}

.rwp-customer-assistant__bubble .rwp-customer-assistant__brand-m {
  color: #35ee86;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rwp-customer-assistant__bubble .rwp-customer-assistant__brand-i {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.rwp-customer-assistant__bubble .rwp-customer-assistant__brand-o {
  color: #ff3b34;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rwp-customer-assistant__badge {
  position: absolute;
  top: -7px;
  right: -5px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--rwp-red);
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(233, 43, 36, 0.35);
  font-size: 13px;
  line-height: 1;
  z-index: 2;
}

.rwp-customer-assistant__badge[hidden] {
  display: none;
}

body.rwp-customer-assistant-cart-active .orderable-floating-cart {
  display: none !important;
}

.rwp-customer-assistant__panel {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(460px, calc(100vw - 24px));
  height: 100vh;
  height: 100dvh;
  border-radius: 0 22px 22px 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-left: 0;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto minmax(148px, 1fr) auto auto auto auto;
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
  will-change: transform;
}

@keyframes rwp-customer-heartbeat {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  22% {
    opacity: 1;
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

.rwp-customer-assistant--open .rwp-customer-assistant__panel {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.rwp-customer-assistant--open .rwp-customer-assistant__bubble {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-24px) scale(0.92);
}

.rwp-customer-assistant__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--rwp-ink);
  background: linear-gradient(135deg, #fff8df, #ffffff 68%);
  border-bottom: 1px solid var(--rwp-border);
}

.rwp-customer-assistant__header strong,
.rwp-customer-assistant__header span {
  display: block;
}

.rwp-customer-assistant__header strong {
  font-size: 17px;
}

.rwp-customer-assistant__header span {
  margin-top: 3px;
  color: var(--rwp-muted);
  font-size: 13px;
}

.rwp-customer-assistant__header .rwp-customer-assistant__brand {
  display: inline-flex;
}

.rwp-customer-assistant__header .rwp-customer-assistant__brand span {
  display: inline;
  margin-top: 0;
  font-size: inherit;
}

.rwp-customer-assistant__header .rwp-customer-assistant__brand-m {
  color: var(--rwp-green);
}

.rwp-customer-assistant__header .rwp-customer-assistant__brand-i {
  color: #fff;
}

.rwp-customer-assistant__header .rwp-customer-assistant__brand-o {
  color: var(--rwp-red);
}

.rwp-customer-assistant__close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--rwp-border);
  background: #fff;
  color: var(--rwp-ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.rwp-customer-assistant__messages {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #fafafa;
  scrollbar-gutter: stable;
}

.rwp-customer-assistant__message {
  width: fit-content;
  max-width: 92%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 17px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.rwp-customer-assistant__message--assistant {
  color: var(--rwp-ink);
  background: #fff;
  border: 1px solid var(--rwp-border);
  border-bottom-left-radius: 6px;
}

.rwp-customer-assistant__message--user {
  margin-left: auto;
  color: #fff;
  background: var(--rwp-green);
  border-bottom-right-radius: 6px;
}

.rwp-customer-assistant__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 0;
  background: #fff;
}

.rwp-customer-assistant__quick[hidden] {
  display: none;
}

.rwp-customer-assistant__quick button {
  border: 1px solid rgba(0, 128, 55, 0.3);
  border-radius: 999px;
  background: rgba(0, 128, 55, 0.08);
  color: var(--rwp-green);
  padding: 8px 11px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.rwp-customer-assistant__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 18px;
  background: #fff;
}

.rwp-customer-assistant__form textarea {
  width: 100%;
  min-height: 48px;
  max-height: 96px;
  resize: none;
  border: 1px solid var(--rwp-border);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.rwp-customer-assistant__form textarea:focus {
  border-color: var(--rwp-green);
  box-shadow: 0 0 0 3px rgba(0, 128, 55, 0.12);
}

.rwp-customer-assistant__form button {
  border: 0;
  border-radius: 14px;
  background: var(--rwp-red);
  color: #fff;
  width: 58px;
  padding: 0;
  cursor: pointer;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.rwp-customer-assistant__form textarea:disabled,
.rwp-customer-assistant__form button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.rwp-customer-assistant__privacy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 12px;
  background: #fff;
  color: var(--rwp-muted);
  font-size: 11px;
  line-height: 1.35;
}

.rwp-customer-assistant__privacy button {
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--rwp-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 5px 9px;
  white-space: nowrap;
}

.rwp-customer-assistant__cart {
  min-height: 44px;
  padding: 0 18px max(24px, env(safe-area-inset-bottom));
  background: #fff;
  color: var(--rwp-muted);
  font-size: 13px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.rwp-customer-assistant__cart[hidden] {
  display: none;
}

.rwp-customer-assistant__cart ul {
  list-style: none;
  margin: 10px 0 10px;
  padding: 0;
  display: grid;
  gap: 7px;
  max-height: clamp(104px, 24vh, 190px);
  overflow: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.rwp-customer-assistant__cart li,
.rwp-customer-assistant__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rwp-customer-assistant__cart li {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f6f6f6;
  color: var(--rwp-ink);
}

.rwp-customer-assistant__cart li span {
  min-width: 0;
  flex: 1;
}

.rwp-customer-assistant__cart li button {
  border: 0;
  border-radius: 50%;
  background: var(--rwp-red);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(233, 43, 36, 0.24);
}

.rwp-customer-assistant__cart li button:hover,
.rwp-customer-assistant__cart li button:focus-visible {
  outline: 3px solid rgba(233, 43, 36, 0.22);
  transform: translateY(-1px);
}

.rwp-customer-assistant__total {
  color: var(--rwp-ink);
  font-size: 15px;
  margin: 8px 0 12px;
}

.rwp-customer-assistant__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rwp-customer-assistant__cart a,
.rwp-customer-assistant__service {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--rwp-border);
  color: var(--rwp-ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

.rwp-customer-assistant__service {
  min-width: 0;
  flex: 1;
  background: #fff;
  cursor: pointer;
  text-align: left;
  justify-content: flex-start;
  white-space: normal;
}

.rwp-customer-assistant__cart .rwp-customer-assistant__checkout {
  flex: 0 0 auto;
  color: #fff;
  border-color: var(--rwp-green);
  background: var(--rwp-green);
}

@media (max-width: 640px) {
  .rwp-customer-assistant {
    left: 16px;
    bottom: 16px;
  }

  .rwp-customer-assistant__panel {
    left: 0;
    top: 0;
    bottom: 0;
    width: min(92vw, 430px);
    height: 100vh;
    height: 100dvh;
    border-radius: 0 18px 18px 0;
    grid-template-rows: auto minmax(154px, 1fr) auto auto auto auto;
  }

  .rwp-customer-assistant__messages {
    padding: 14px 12px;
  }

  .rwp-customer-assistant__quick {
    padding: 10px 12px 0;
  }

  .rwp-customer-assistant__form {
    padding: 12px;
  }

  .rwp-customer-assistant__privacy {
    padding: 0 12px 10px;
  }

  .rwp-customer-assistant__cart {
    padding: 0 12px 22px;
  }

  .rwp-customer-assistant__cart ul {
    max-height: clamp(92px, 22vh, 156px);
  }

  .rwp-customer-assistant__header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
  }
}
