/* Chat de atención al cliente de rSearch (prefijo rsc- para no chocar con el tema). */
.rsc-root { --rsc-primary: #166534; position: fixed; right: 20px; bottom: 20px; z-index: 99990; font-family: inherit; font-size: 14px; line-height: 1.45; color: #1e293b; }
.rsc-root *, .rsc-root *::before, .rsc-root *::after { box-sizing: border-box; }

.rsc-bubble { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--rsc-primary); box-shadow: 0 8px 24px rgba(15, 23, 42, .22); transition: transform .15s ease; }
.rsc-bubble:hover { transform: scale(1.06); }
.rsc-bubble:focus-visible { outline: 3px solid rgba(15, 23, 42, .35); outline-offset: 3px; }
.rsc-is-open .rsc-bubble { display: none; }

.rsc-panel { display: none; position: absolute; right: 0; bottom: 0; width: 370px; height: min(600px, calc(100vh - 40px)); background: #fff; border-radius: 16px; box-shadow: 0 18px 48px rgba(15, 23, 42, .25); overflow: hidden; flex-direction: column; }
.rsc-is-open .rsc-panel { display: flex; }

.rsc-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 14px 18px; background: var(--rsc-primary); color: #fff; }
.rsc-title { flex: 1; font-weight: 700; font-size: 15px; }
.rsc-restart { border: 0; background: transparent; color: rgba(255, 255, 255, .85); font-size: 12px; text-decoration: underline; cursor: pointer; padding: 4px; }
.rsc-close { border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.rsc-close:hover { background: rgba(255, 255, 255, .28); }

.rsc-body { flex: 1; overflow-y: auto; padding: 16px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; }
.rsc-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; word-wrap: break-word; }
.rsc-bot { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; }
.rsc-user { align-self: flex-end; background: var(--rsc-primary); color: #fff; border-bottom-right-radius: 4px; }
.rsc-typing { color: #64748b; font-style: italic; }

.rsc-quick, .rsc-links { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.rsc-chip { border: 1px solid var(--rsc-primary); color: var(--rsc-primary); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.rsc-chip:hover { background: var(--rsc-primary); color: #fff; }
.rsc-link { display: inline-block; background: var(--rsc-primary); color: #fff !important; border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600; text-decoration: none; }
/* «Haz clic aquí para más información»: parece un enlace (subrayado, flecha), no un botón más. */
.rsc-link-hint { flex: 0 0 100%; font-size: 12px; color: #475569; margin-bottom: -2px; }
.rsc-link-info { background: #fff; color: var(--rsc-primary) !important; border: 1px solid var(--rsc-primary); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.rsc-link-info:hover { background: var(--rsc-primary); color: #fff !important; }

.rsc-products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-self: stretch; }
.rsc-product { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px; text-decoration: none; color: inherit; }
.rsc-product:hover { border-color: var(--rsc-primary); }
.rsc-product img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 6px; background: #fff; }
.rsc-pname { font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rsc-pprice { font-weight: 700; font-size: 13px; color: var(--rsc-primary); }

.rsc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e2e8f0; background: #fff; }
.rsc-input { flex: 1; min-width: 0; border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 12px; font-size: 14px; outline: none; }
.rsc-input:focus { border-color: var(--rsc-primary); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
.rsc-send { border: 0; border-radius: 10px; padding: 0 14px; background: var(--rsc-primary); color: #fff; font-weight: 600; cursor: pointer; }

@media (max-width: 480px) {
    .rsc-root { right: 12px; bottom: 12px; }
    .rsc-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
}

.rsc-add { margin-top: 4px; border: 0; border-radius: 8px; padding: 6px 8px; background: var(--rsc-primary); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.rsc-add:disabled { opacity: .75; cursor: default; }
.rsc-add.is-added { background: #16a34a; }

/* Conversación con una persona */
.rsc-bar { display: none; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 14px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.rsc-human { border: 1px solid var(--rsc-primary); background: #fff; color: var(--rsc-primary); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.rsc-human:hover { background: var(--rsc-primary); color: #fff; }
.rsc-human-end { border-color: #cbd5e1; color: #475569; }
.rsc-human-end:hover { background: #475569; border-color: #475569; }
.rsc-livetag { font-size: 12px; font-weight: 600; color: #047857; display: inline-flex; align-items: center; gap: 6px; }
.rsc-livetag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.rsc-agent { background: #ecfdf5; border-color: #a7f3d0; }
.rsc-agentname { font-size: 11px; font-weight: 700; color: #047857; margin-bottom: 2px; }
.rsc-sys { align-self: center; max-width: 92%; text-align: center; font-size: 12px; color: #64748b; padding: 2px 8px; }
.rsc-has-unread::after { content: ""; position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.rsc-bubble { position: relative; }
.rsc-liveform { align-self: stretch; display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.rsc-liveinput { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; }
.rsc-liveinput:focus { outline: 2px solid var(--rsc-primary); outline-offset: 0; }
.rsc-liveerr { color: #dc2626; font-size: 12px; }
.rsc-liverow { display: flex; gap: 8px; }
.rsc-livego { border: 0; background: var(--rsc-primary); color: #fff; border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.rsc-livego:disabled { opacity: .6; cursor: wait; }
.rsc-livecancel { border: 1px solid #cbd5e1; background: #fff; color: #475569; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
