.ln-csr-root {
  --ln-csr-accent: #5a3d23;
  --ln-csr-accent-contrast: #ffffff;
  --ln-csr-bg: rgb(var(--color-background, 255, 253, 248));
  --ln-csr-ink: rgb(var(--color-foreground, 32, 29, 27));
  --ln-csr-muted: color-mix(in srgb, var(--ln-csr-ink) 66%, transparent);
  --ln-csr-soft: color-mix(in srgb, var(--ln-csr-bg) 88%, var(--ln-csr-ink));
  --ln-csr-bottom-offset: 88px;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(var(--ln-csr-bottom-offset), env(safe-area-inset-bottom));
  z-index: 2147483000;
  color: var(--ln-csr-ink);
  font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ln-csr-root *, .ln-csr-root *::before, .ln-csr-root *::after { box-sizing: border-box; }
.ln-csr-root button, .ln-csr-root textarea { font: inherit; }
.ln-csr-root button:focus-visible, .ln-csr-root textarea:focus-visible, .ln-csr-root a:focus-visible {
  outline: 3px solid #f0b44d;
  outline-offset: 2px;
}

.ln-csr-launcher {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 18px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: var(--ln-csr-accent);
  color: var(--ln-csr-accent-contrast);
  box-shadow: 0 8px 28px rgb(32 29 27 / 22%);
  cursor: pointer;
  font-weight: 700;
}

.ln-csr-launcher__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.ln-csr-launcher__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ln-csr-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 172px));
  margin-bottom: 12px;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--ln-csr-ink) 14%, transparent);
  border-radius: 20px;
  background: var(--ln-csr-bg);
  box-shadow: 0 18px 60px rgb(32 29 27 / 20%);
}

.ln-csr-panel[hidden] { display: none; }
.ln-csr-header { display: flex; justify-content: space-between; gap: 16px; padding: 18px 18px 14px; background: var(--ln-csr-accent); color: var(--ln-csr-accent-contrast); }
.ln-csr-header h2 { margin: 0; color: inherit; font-size: 18px; line-height: 1.25; }
.ln-csr-header p { margin: 4px 0 0; color: inherit; font-size: 12px; opacity: .9; }
.ln-csr-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ln-csr-accent-contrast) 16%, transparent); color: inherit; cursor: pointer; font-size: 26px; line-height: 1; }
.ln-csr-conversation { min-height: 126px; padding: 18px; background: var(--ln-csr-soft); }
.ln-csr-message { max-width: 86%; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; white-space: pre-line; }
.ln-csr-message--assistant { background: var(--ln-csr-bg); border-bottom-left-radius: 4px; }
.ln-csr-message--customer { margin-left: auto; background: var(--ln-csr-accent); color: var(--ln-csr-accent-contrast); border-bottom-right-radius: 4px; }
.ln-csr-orders { display: grid; gap: 10px; margin: 0 0 12px; }
.ln-csr-order { overflow: hidden; border: 1px solid color-mix(in srgb, var(--ln-csr-ink) 14%, transparent); border-radius: 14px; background: var(--ln-csr-bg); box-shadow: 0 3px 12px rgb(32 29 27 / 7%); }
.ln-csr-order__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-bottom: 1px solid color-mix(in srgb, var(--ln-csr-ink) 10%, transparent); }
.ln-csr-order__header h3 { margin: 0; color: var(--ln-csr-ink); font-size: 16px; line-height: 1.25; }
.ln-csr-order__status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: var(--ln-csr-soft); color: var(--ln-csr-muted); font-size: 11px; font-weight: 750; line-height: 1.2; }
.ln-csr-order__status--complete { background: #e5f4eb; color: #226541; }
.ln-csr-order__status--pending { background: #fff1cc; color: #76520a; }
.ln-csr-order__status--attention { background: #fbe7e3; color: #8a281d; }
.ln-csr-order__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding: 12px; }
.ln-csr-order__detail { min-width: 0; }
.ln-csr-order__detail dt { margin: 0 0 2px; color: var(--ln-csr-muted); font-size: 11px; font-weight: 650; }
.ln-csr-order__detail dd { margin: 0; overflow-wrap: anywhere; color: var(--ln-csr-ink); font-size: 13px; font-weight: 650; }
.ln-csr-order__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.ln-csr-order__actions a { padding: 7px 10px; border: 1px solid var(--ln-csr-accent); border-radius: 999px; color: var(--ln-csr-accent); font-size: 12px; font-weight: 750; text-decoration: none; }
.ln-csr-order__actions a:first-child { background: var(--ln-csr-accent); color: var(--ln-csr-accent-contrast); }
.ln-csr-products { display: grid; gap: 10px; margin: 0 0 12px; }
.ln-csr-product { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid color-mix(in srgb, var(--ln-csr-ink) 12%, transparent); border-radius: 14px; background: var(--ln-csr-bg); }
.ln-csr-product__image, .ln-csr-product__placeholder { width: 72px; height: 72px; border-radius: 10px; background: var(--ln-csr-soft); object-fit: cover; }
.ln-csr-product__placeholder { display: grid; place-items: center; color: var(--ln-csr-muted); font-size: 24px; }
.ln-csr-product__details { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
.ln-csr-product__title { display: -webkit-box; max-width: 100%; overflow: hidden; color: var(--ln-csr-ink); font-weight: 700; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
.ln-csr-product__price { font-weight: 650; }
.ln-csr-product__availability { color: var(--ln-csr-muted); font-size: 12px; }
.ln-csr-product__availability--available { color: #28734c; }
.ln-csr-product__availability--unavailable { color: #9d2d20; }
.ln-csr-product__link { margin-top: auto; color: var(--ln-csr-accent); font-size: 12px; font-weight: 700; }
.ln-csr-status { min-height: 20px; margin: 0; padding: 10px 18px 0; color: var(--ln-csr-muted); font-size: 12px; }
.ln-csr-status[data-state="error"] { color: #9d2d20; }
.ln-csr-status[data-state="loading"] { display: flex; align-items: center; justify-content: center; min-height: 34px; }
.ln-csr-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid color-mix(in srgb, var(--ln-csr-accent) 24%, transparent); border-top-color: var(--ln-csr-accent); border-radius: 50%; animation: ln-csr-spin 700ms linear infinite; }
.ln-csr-spinner--button { width: 16px; height: 16px; border-color: color-mix(in srgb, var(--ln-csr-accent-contrast) 40%, transparent); border-top-color: var(--ln-csr-accent-contrast); }
.ln-csr-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
@keyframes ln-csr-spin { to { transform: rotate(360deg); } }
.ln-csr-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; }
.ln-csr-actions button { padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--ln-csr-ink) 28%, transparent); border-radius: 999px; background: var(--ln-csr-bg); color: var(--ln-csr-ink); cursor: pointer; }
.ln-csr-actions button:disabled { cursor: not-allowed; opacity: .55; }
.ln-csr-actions .ln-csr-human { border-color: transparent; background: var(--ln-csr-soft); font-weight: 700; }
.ln-csr-actions .ln-csr-human[hidden] { display: none; }
.ln-csr-actions .ln-csr-sign-in { border-color: transparent; background: var(--ln-csr-accent); color: var(--ln-csr-accent-contrast); font-weight: 700; }
.ln-csr-actions .ln-csr-sign-in:disabled { opacity: 1; }
.ln-csr-actions .ln-csr-sign-in[hidden] { display: none; }
.ln-csr-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 4px 18px 14px; }
.ln-csr-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ln-csr-form textarea { width: 100%; min-height: 48px; resize: vertical; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--ln-csr-ink) 24%, transparent); border-radius: 12px; background: var(--ln-csr-bg); color: var(--ln-csr-ink); }
.ln-csr-form button { align-self: end; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 12px; background: var(--ln-csr-accent); color: var(--ln-csr-accent-contrast); cursor: pointer; font-weight: 700; }
.ln-csr-form button:disabled { cursor: not-allowed; opacity: .55; }
.ln-csr-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px 16px; color: var(--ln-csr-muted); font-size: 11px; }
.ln-csr-footer a { color: var(--ln-csr-accent); }
.ln-csr-footer button { padding: 0; border: 0; background: transparent; color: var(--ln-csr-accent); cursor: pointer; font-size: inherit; font-weight: 700; text-decoration: underline; }
.ln-csr-footer button:disabled { cursor: not-allowed; opacity: .55; }

@media (max-width: 480px) {
  .ln-csr-root { --ln-csr-bottom-offset: 76px; right: 12px; left: 12px; }
  .ln-csr-panel { width: 100%; max-height: calc(100dvh - 156px); }
  .ln-csr-order__details { grid-template-columns: 1fr; gap: 9px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ln-csr-launcher { transition: transform 160ms ease, box-shadow 160ms ease; }
  .ln-csr-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgb(32 29 27 / 28%); }
}

@media (prefers-reduced-motion: reduce) {
  .ln-csr-spinner { animation: none; }
}
