/* Storefront chat widget — self-contained (the theme's styles must not leak in, nor ours out). */
.rxsc { --rxsc: #7c3aed; position: fixed; bottom: 20px; z-index: 99995; font-family: inherit; }
.rxsc-left { left: 20px; }
.rxsc-right { right: 20px; }
.rxsc *, .rxsc *::before, .rxsc *::after { box-sizing: border-box; }
.rxsc-fab { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--rxsc); color: #fff; font-size: 26px; cursor: pointer; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.rxsc-fab[hidden], .rxsc-panel[hidden] { display: none !important; }
.rxsc-panel { width: 360px; max-width: calc(100vw - 24px); height: 520px; max-height: calc(100vh - 40px); background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); display: flex; flex-direction: column; overflow: hidden; }
.rxsc-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--rxsc); color: #fff; font-size: 15px; }
.rxsc-close { background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; padding: 0; }
.rxsc-body { flex: 1; overflow-y: auto; padding: 12px; background: #f6f7fb; display: flex; flex-direction: column; gap: 8px; }
.rxsc-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.7; word-wrap: break-word; }
.rxsc-msg.is-bot { align-self: flex-start; background: #fff; color: #111827; border: 1px solid #e5e7eb; }
.rxsc-msg.is-user { align-self: flex-end; background: var(--rxsc); color: #fff; }
.rxsc-typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #9ca3af; animation: rxsc-b 1s infinite; }
.rxsc-typing span:nth-child(2) { animation-delay: .15s; }
.rxsc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes rxsc-b { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.rxsc-cards { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; flex-shrink: 0; min-height: 190px; }
/* The body is a flex column: without this every message and card row shrinks to nothing once the chat grows. */
.rxsc-body > * { flex-shrink: 0; }
.rxsc-card { flex: 0 0 140px; display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px; text-decoration: none !important; color: #111827 !important; }
.rxsc-card img { display: block; width: 100% !important; max-width: 100% !important; height: 100px !important; object-fit: contain; border-radius: 8px; margin-bottom: 6px; }
.rxsc-card-name { font-size: 12px; font-weight: 600; line-height: 1.5; max-height: 3em; overflow: hidden; }
.rxsc-card-price { font-size: 12px; color: var(--rxsc); font-weight: 700; margin-top: 4px; }
.rxsc-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #e5e7eb; margin: 0; }
.rxsc-input { flex: 1; border: 1px solid #d1d5db !important; border-radius: 10px !important; padding: 8px 10px !important; font-size: 14px !important; min-height: 40px; }
.rxsc-send { border: 0; border-radius: 10px; background: var(--rxsc); color: #fff; width: 44px; font-size: 16px; cursor: pointer; }
@media (max-width: 480px) {
	.rxsc-left { left: 12px; }
	.rxsc-right { right: 12px; }
	.rxsc-panel { height: calc(100vh - 90px); }
}
