/* ==========================================================================
   Reception chat — shared by the live room (desk panel) and the website
   (floating widget). Hosts theme it only through the --rc-* properties.
   ========================================================================== */
.rc, .rcw {
  --rc-ink: #f5f3fa;
  --rc-mute: #9c97b3;
  --rc-soft: #c9c4dc;
  --rc-accent: #e91ec2;
  --rc-grad: linear-gradient(100deg, #ff6b2c 0%, #f0258f 52%, #a62bb0 100%);
  --rc-surface: rgba(255, 255, 255, .04);
  --rc-field: rgba(8, 5, 16, .7);
  --rc-line: rgba(255, 255, 255, .12);
  --rc-edge: rgba(240, 37, 143, .24);
  --rc-tint: rgba(240, 37, 143, .08);
  --rc-bg: #150b2a;
  --rc-ok: #6bff9e;
  --rc-bad: #ff8a8a;
  --rc-font: inherit;
  --rc-display: inherit;
  /* brand washes (the embed's metro theme overrides these, see ChatEmbed::THEMES) */
  --rc-glow: rgba(240, 37, 143, .15);
  --rc-scroll: rgba(240, 37, 143, .3);
  --rc-wash: linear-gradient(120deg, rgba(255,107,44,.12), rgba(240,37,143,.12) 55%, rgba(166,43,176,.12));
  --rc-wash-strong: linear-gradient(120deg, rgba(255,107,44,.16), rgba(240,37,143,.14) 55%, rgba(166,43,176,.16));
  --rc-panel: rgba(17, 12, 28, .94);
  --rc-shadow: rgba(233, 30, 194, .35);
  --rc-ring: rgba(233, 30, 194, .45);
  --rc-badge: #b0128f;
  --rc-ava-bg: var(--rc-field);
}
.rc { display: flex; flex-direction: column; gap: 14px; min-height: 0; color: var(--rc-ink); font-family: var(--rc-font); }
.rc [hidden] { display: none !important; }
.rc button, .rc input, .rc textarea { font: inherit; color: inherit; }

/* header */
.rc-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--rc-wash); border: 1px solid var(--rc-edge); }
.rc-ava { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--rc-ava-bg); border: 1px solid var(--rc-edge); }
.rc-ava img { width: 26px; height: 26px; object-fit: contain; }
.rc-ava i { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--rc-ok); border: 2px solid var(--rc-bg); box-shadow: 0 0 10px var(--rc-ok); }
.rc-ava i.off { background: var(--rc-mute); box-shadow: none; }
.rc-head b { display: block; font-family: var(--rc-display); font-weight: 800; font-size: 15px; }
.rc-head em { display: block; font-style: normal; font-size: 11.5px; color: var(--rc-mute); margin-top: 2px; }

/* step 1: divisions */
.rc-step, .rc-divlist { display: grid; gap: 10px; }
.rc-kicker { font-size: 12px; color: var(--rc-mute); margin: 0; }
.rc-div { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--rc-line); background: var(--rc-surface); cursor: pointer; text-align: left; transition: border-color .2s, background .2s, transform .2s; }
.rc-div:hover, .rc-div:focus-visible { border-color: var(--rc-accent); background: var(--rc-tint); transform: translateX(3px); outline: none; }
.rc-div .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; background: var(--rc-field); border: 1px solid var(--rc-edge); }
.rc-div b { display: block; font-family: var(--rc-display); font-weight: 800; font-size: 15px; }
.rc-div em { display: block; font-style: normal; font-size: 12px; color: var(--rc-mute); margin-top: 3px; line-height: 1.45; }
.rc-div::after { content: "→"; color: var(--rc-accent); font-size: 16px; }

/* step 2: form */
.rc-form { display: grid; gap: 12px; margin: 0; }
.rc-picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--rc-tint); border: 1px solid var(--rc-edge); font-size: 13px; }
.rc-picked b { font-family: var(--rc-display); font-weight: 700; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rc-line); background: var(--rc-surface); font-size: 12px; cursor: pointer; transition: border-color .2s; }
.rc-chip:hover { border-color: var(--rc-accent); }
.rc-field { display: grid; gap: 6px; font-size: 12px; color: var(--rc-mute); }
.rc-input { width: 100%; background: var(--rc-field); border: 1px solid var(--rc-line); border-radius: 12px; padding: 11px 13px; font-size: 14px; color: var(--rc-ink); resize: vertical; box-sizing: border-box; }
.rc-input:focus { border-color: var(--rc-accent); outline: none; }
.rc-input[aria-invalid="true"] { border-color: var(--rc-bad); }
.rc-err { color: var(--rc-bad); font-size: 11.5px; }
.rc-err:empty { display: none; }
.rc-alert { padding: 10px 12px; border-radius: 12px; background: rgba(255,138,138,.1); border: 1px solid rgba(255,138,138,.35); color: #ffc2c2; font-size: 12.5px; line-height: 1.5; }
.rc-alert:empty { display: none; }
.rc-btn { width: 100%; padding: 13px 20px; border: 0; border-radius: 999px; background: var(--rc-grad); color: #fff; font-family: var(--rc-display); font-weight: 700; font-size: 14px; cursor: pointer; transition: box-shadow .2s, transform .15s; }
.rc-btn:hover { box-shadow: 0 0 0 6px var(--rc-glow); }
.rc-btn:active { transform: scale(.98); }
.rc-btn:disabled { opacity: .55; cursor: wait; }
.rc-fine { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--rc-mute); }
.rc-link { background: none; border: 0; padding: 0; color: var(--rc-accent); text-decoration: underline; cursor: pointer; font-size: inherit; }

/* chat */
.rc-chat { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
/* only the conversation shrinks; preview, composer and footer always stay whole */
.rc-chat > :not(.rc-log) { flex-shrink: 0; }
.rc-log { flex: 1 1 auto; min-height: 70px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 6px 0; scrollbar-width: thin; scrollbar-color: var(--rc-scroll) transparent; }
.rc-msg { max-width: 84%; display: grid; gap: 3px; }
.rc-msg p { margin: 0; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.rc-msg p a { color: inherit; text-decoration: underline; }
.rc-msg small { font-size: 10.5px; color: var(--rc-mute); padding: 0 6px; }
.rc-msg.agent { align-self: flex-start; }
.rc-msg.agent p { background: rgba(255,255,255,.06); border: 1px solid var(--rc-line); border-bottom-left-radius: 5px; }
.rc-msg.visitor { align-self: flex-end; text-align: right; }
.rc-msg.visitor p { background: var(--rc-grad); color: #fff; border-bottom-right-radius: 5px; text-align: left; }
.rc-msg.visitor.pending p { opacity: .6; }
.rc-msg.visitor.failed p { background: rgba(255,138,138,.18); border: 1px solid rgba(255,138,138,.5); }
.rc-msg.visitor.failed small { color: var(--rc-bad); cursor: pointer; text-decoration: underline; }
.rc-msg.has-file { max-width: 78%; }
.rc-media { display: block; margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--rc-line); background: var(--rc-field); }
.rc-msg.agent .rc-media { border-bottom-left-radius: 5px; }
.rc-media + p { margin-top: 4px; }
.rc-img { width: 260px; max-width: 100%; max-height: 320px; padding: 0; cursor: zoom-in; }
.rc-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.rc-img:hover img { transform: scale(1.03); }
video.rc-media { width: 260px; max-width: 100%; max-height: 320px; }
.rc-audio { width: 240px; max-width: 100%; height: 42px; background: transparent; border: 0; }
.rc-file { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; min-width: 210px; }
.rc-file .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--rc-tint); border: 1px solid var(--rc-edge); }
.rc-file b { display: block; font-size: 12.5px; word-break: break-all; }
.rc-file em { display: block; font-style: normal; font-size: 11px; color: var(--rc-mute); }
.rc-file .rc-big { grid-column: 1 / -1; color: var(--rc-soft); }
.rc-file .rc-link { font-size: 12px; font-weight: 700; }
.rc-file.is-pdf { grid-template-columns: 1fr auto; padding: 0 12px 0 0; }
.rc-file-open { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 10px 0 10px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rc-file-open:hover b { color: var(--rc-accent); }
.rc-file.is-pdf .ic { font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, #ff5a4e, #d2186d); border: 0; }
.rc-file-dl { font-weight: 500 !important; color: var(--rc-mute) !important; }
.rc-msg.system { align-self: center; max-width: 92%; text-align: center; }
.rc-msg.system p { padding: 6px 12px; font-size: 11.5px; color: var(--rc-soft); background: var(--rc-tint); border: 1px dashed var(--rc-edge); border-radius: 999px; }
.rc-rate { padding: 16px; border-radius: 18px; text-align: center; background: var(--rc-wash); border: 1px solid var(--rc-edge); }
.rc-rate-q { margin: 0; font-family: var(--rc-display); font-weight: 800; font-size: 15px; }
.rc-stars { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.rc-star { width: 42px; height: 42px; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 12px; transition: transform .15s; }
.rc-star svg { width: 100%; height: 100%; fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.35); stroke-width: 1.2; transition: fill .15s, stroke .15s, filter .15s; }
.rc-star.on svg { fill: #ffc74a; stroke: #ffb020; filter: drop-shadow(0 0 8px rgba(255,190,60,.55)); }
.rc-star:hover { transform: scale(1.12); }
.rc-star:focus-visible { outline: 2px solid var(--rc-accent); outline-offset: 2px; }
.rc-rate-label { margin: 6px 0 0; font-size: 12px; color: var(--rc-soft); min-height: 18px; }
.rc-rate-more { display: grid; gap: 10px; margin-top: 12px; text-align: left; }
.rc-rate-more .rc-input { resize: none; font-size: 13px; }
.rc-rate-done { margin: 0; display: grid; gap: 4px; }
.rc-rate-done b { font-family: var(--rc-display); font-size: 15px; }
.rc-rate-done em { font-style: normal; font-size: 12px; color: var(--rc-soft); }
.rc-stars-static { font-size: 24px; letter-spacing: 3px; color: #ffc74a; text-shadow: 0 0 10px rgba(255,190,60,.5); }
.rc-stars-static i { font-style: normal; color: rgba(255,255,255,.18); text-shadow: none; }
.rc-closed { padding: 12px 14px; border-radius: 14px; background: var(--rc-surface); border: 1px solid var(--rc-line); font-size: 12.5px; color: var(--rc-soft); text-align: center; }
.rc-compose { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: end; margin: 0; }
.rc-compose .rc-input { resize: none; max-height: 120px; min-height: 46px; line-height: 1.45; }
.rc-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--rc-grad); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform .15s, box-shadow .2s; }
.rc-send:hover { box-shadow: 0 0 0 6px var(--rc-glow); }
.rc-send:active { transform: scale(.92); }
.rc-locbtn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--rc-line); background: var(--rc-surface); color: var(--rc-ink); cursor: pointer; display: grid; place-items: center; transition: border-color .2s, color .2s; }
.rc-locbtn:hover { border-color: var(--rc-accent); color: var(--rc-accent); }
.rc-locbtn.busy svg { animation: rc-bob 1s ease-in-out infinite; }
@keyframes rc-bob { 50% { transform: translateY(-3px); } }
.rc-ask { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--rc-tint); border: 1px solid var(--rc-edge); }
.rc-ask > p { margin: 0; font-size: 13px; font-weight: 600; }
.rc-ask .rc-map { width: 100%; height: 130px; }
.rc-ask { margin-bottom: 2px; }
.rc-locact { display: flex; align-items: center; gap: 14px; }
.rc-locact .rc-btn { width: auto; padding: 10px 18px; font-size: 13px; }
.rc-map { position: relative; width: 260px; max-width: 100%; height: 160px; color: var(--rc-ink); text-decoration: none; }
.rc-tiles { position: absolute; width: 512px; height: 512px; }
.rc-tiles img { position: absolute; width: 256px; height: 256px; filter: saturate(.85) brightness(.92); }
.rc-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; border-radius: 50% 50% 50% 0; background: var(--rc-grad); transform: rotate(-45deg); box-shadow: 0 4px 12px rgba(0,0,0,.45); border: 2px solid #fff; }
.rc-pin::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.rc-mapcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; background: linear-gradient(transparent, rgba(8,5,16,.92)); font-size: 12.5px; font-weight: 700; color: #fff; }
.rc-mapcap em { display: block; font-style: normal; font-weight: 500; font-size: 11px; color: var(--rc-soft); margin-top: 2px; }
.rc-osm { position: absolute; top: 4px; right: 6px; font-size: 9px; color: #333; background: rgba(255,255,255,.75); padding: 1px 4px; border-radius: 4px; }
.rc-ask-img { display: block; max-width: 100%; max-height: 120px; border-radius: 12px; object-fit: contain; justify-self: start; border: 1px solid var(--rc-line); }
.rc-ask .rc-input { padding: 9px 12px; font-size: 13px; }
.rc-ask .rc-file { background: var(--rc-field); }
.rc-progress { display: block; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-bottom: 4px; }
.rc-progress i { display: block; height: 100%; width: 0; background: var(--rc-grad); transition: width .25s; }
.rc-msg.uploading .rc-media { opacity: .75; }
.rc.is-drop .rc-chat { outline: 2px dashed var(--rc-accent); outline-offset: 4px; border-radius: 16px; }
.rc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: var(--rc-mute); }

/* image viewer (lightbox) — photos open here instead of a new tab */
.rc-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(5, 3, 10, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #f5f3fa; font-family: var(--font-body, inherit); }
.rc-lightbox[hidden] { display: none; }
.rc-lb-top { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 16px; }
.rc-lb-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14px; }
.rc-lb-btn { height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.rc-lb-btn:hover { border-color: var(--rc-accent, #e91ec2); background: var(--rc-glow, rgba(233,30,194,.18)); }
.rc-lb-stage { min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.rc-lb-stage img { display: block; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
/* PDF pages */
.rc-lightbox.is-pdf .rc-lb-stage { align-items: stretch; }
.rc-pdf { width: min(900px, 100%); height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 24px; scrollbar-width: thin; scrollbar-color: var(--rc-scroll, rgba(240,37,143,.4)) transparent; -webkit-overflow-scrolling: touch; }
.rc-pdf canvas { display: block; width: 100%; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.rc-pdf-msg { margin: auto; padding: 24px; text-align: center; font-size: 14px; color: #d9d4ea; }
.rc-pdf-count { margin: 0; padding: 0; font-size: 12px; color: #9c97b3; }
.rc-lb-cap { padding: 14px 20px 22px; text-align: center; font-size: 14px; line-height: 1.5; color: #d9d4ea; white-space: pre-wrap; }
.rc-lb-cap:empty { display: none; }

/* ==========================================================================
   Website floating widget (.rcw) — launcher + panel
   ========================================================================== */
.rcw { position: fixed; right: 20px; bottom: 20px; z-index: 120; font-family: var(--font-body, inherit); --rc-font: var(--font-body, inherit); --rc-display: var(--font-display, inherit); --rc-bg: #0b0a12; }
.rcw [hidden] { display: none !important; }
.rcw-launch { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 20px 14px 16px; border: 0; border-radius: 999px; background: var(--rc-grad); color: #fff; font-family: var(--rc-display); font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 14px 34px var(--rc-shadow), 0 0 0 1px rgba(255,255,255,.08) inset; transition: transform .2s, box-shadow .2s; }
.rcw-launch:hover { transform: translateY(-2px); box-shadow: 0 18px 40px var(--rc-ring); }
.rcw-launch svg { flex: none; }
.rcw-launch::before { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--rc-ring); animation: rcw-pulse 2.6s ease-out infinite; pointer-events: none; }
.rcw.is-open .rcw-launch::before, .rcw.is-seen .rcw-launch::before { animation: none; opacity: 0; }
@keyframes rcw-pulse { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.18); opacity: 0; } }
.rcw-badge { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--rc-badge); font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.rcw-panel { position: absolute; right: 0; bottom: calc(100% + 14px); width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column; border-radius: 24px; background: var(--rc-panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--rc-edge); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset; overflow: hidden; transform-origin: bottom right; }
.rcw-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--rc-line); background: var(--rc-wash-strong); }
.rcw-top span { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--rc-soft); }
.rcw-top span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc-ok); box-shadow: 0 0 10px var(--rc-ok); }
.rcw-close { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rc-line); background: rgba(255,255,255,.05); color: var(--rc-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.rcw-close:hover { border-color: var(--rc-accent); }
.rcw-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rc-scroll) transparent; }
.rcw-body.chatting { overflow-y: auto; }
.rcw-body.chatting .rcw-intro { display: none; }
.rcw-body .rc { flex: 1; }
.rcw-intro h2 { margin: 0; font-family: var(--rc-display); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--rc-ink); }
.rcw-intro p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--rc-soft); }
.rcw-peek { position: absolute; right: 0; bottom: calc(100% + 12px); width: min(300px, calc(100vw - 40px)); padding: 12px 14px; border-radius: 16px 16px 4px 16px; background: var(--rc-panel); border: 1px solid var(--rc-edge); box-shadow: 0 16px 40px rgba(0,0,0,.45); color: var(--rc-ink); font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; }
.rcw-peek b { display: block; font-family: var(--rc-display); font-size: 12.5px; margin-bottom: 2px; }
.rcw-peek span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--rc-soft); }
@media (max-width: 560px) {
  .rcw { right: 14px; bottom: 14px; }
  .rcw-launch { padding: 14px; }
  .rcw-launch .rcw-label { display: none; }
  .rcw.is-open { inset: 0; right: 0; bottom: 0; }
  .rcw.is-open .rcw-launch { display: none; }
  .rcw.is-open .rcw-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .rcw-launch::before { animation: none; } }
