/* Saven Concierge — chat styles */
.sc { --sc-w: 380px; position: fixed; right: 24px; bottom: 24px; z-index: 120; font-family: var(--sans); }

/* Launcher */
.sc-launch {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 64px; padding: 0 28px 0 22px; border: 0; border-radius: 100px; cursor: pointer;
  background: linear-gradient(135deg, #f6d3a4 0%, #e09a52 100%); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 14px 38px rgba(224,154,82,.45), 0 4px 14px rgba(23,18,14,.3);
  font: 500 13px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), padding .5s var(--ease), background .5s;
  animation: scGlow 3.2s ease-in-out infinite;
}
@keyframes scGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 14px 38px rgba(224,154,82,.45), 0 4px 14px rgba(23,18,14,.3); }
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 16px 54px rgba(224,154,82,.75), 0 4px 14px rgba(23,18,14,.3); }
}
.sc-launch:hover { transform: translateY(-3px) scale(1.03); }
.sc-launch svg { width: 24px; height: 24px; flex: none; }
.sc-ic-flame { fill: var(--ink); animation: scFlame 2.8s ease-in-out infinite; transform-origin: 50% 90%; }
.sc-ic-close { display: none; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
@keyframes scFlame { 0%,100% { transform: scale(1) rotate(0); } 35% { transform: scale(1.06, .96) rotate(-2deg); } 70% { transform: scale(.97, 1.04) rotate(2deg); } }
.sc-launch::before {
  content: ""; position: absolute; inset: -7px; border-radius: inherit;
  border: 1.5px solid rgba(224,154,82,.7); animation: scPulse 2.4s var(--ease) infinite;
}
@keyframes scPulse { 0% { opacity: .9; transform: scale(.95); } 100% { opacity: 0; transform: scale(1.22); } }
.sc.is-open .sc-launch { padding: 0 20px; animation: none; }
.sc.is-open .sc-launch::before { display: none; }
.sc.is-open .sc-ic-flame, .sc.is-open .sc-launch__label { display: none; }
.sc.is-open .sc-ic-close { display: block; }

/* Teaser bubble */
.sc-teaser {
  position: absolute; right: 0; bottom: 80px; width: max-content; max-width: 250px;
  background: var(--cream); color: var(--umber); border-radius: 16px 16px 4px 16px;
  padding: 14px 40px 14px 18px; font: 300 14.5px/1.45 var(--sans); cursor: pointer;
  box-shadow: 0 18px 46px rgba(23,18,14,.3); border: 1px solid rgba(43,32,24,.08);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), visibility .6s;
}
.sc-teaser strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 19px; margin-bottom: 2px; }
.sc-teaser.is-show { opacity: 1; visibility: visible; transform: none; }
.sc-teaser__x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.sc-teaser__x:hover { background: rgba(43,32,24,.08); }
.sc.is-open .sc-teaser { display: none; }

/* Panel */
.sc-panel {
  position: absolute; right: 0; bottom: 74px;
  width: var(--sc-w); height: min(600px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--sand); color: var(--umber);
  border-radius: 18px; border: 1px solid rgba(43,32,24,.1);
  box-shadow: 0 30px 80px rgba(23,18,14,.35);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98); transform-origin: bottom right;
  transition: opacity .55s var(--ease), transform .55s var(--ease), visibility .55s;
}
.sc.is-open .sc-panel { opacity: 1; visibility: visible; transform: none; }

.sc-head {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 18px 18px 18px 20px; background: var(--umber); color: var(--cream);
  overflow: hidden;
}
.sc-head::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,154,82,.28), rgba(224,154,82,0) 65%); pointer-events: none;
}
.sc-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; flex: none; border: 1px solid rgba(246,240,231,.15); }
.sc-avatar svg { width: 22px; height: 22px; fill: var(--ember); filter: drop-shadow(0 0 6px rgba(224,154,82,.7)); animation: scFlame 2.8s ease-in-out infinite; transform-origin: 50% 90%; }
.sc-title { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.1; font-weight: 400; }
.sc-status { margin: 4px 0 0; font-size: 12px; color: rgba(246,240,231,.65); display: flex; align-items: center; gap: 7px; }
.sc-status span { width: 7px; height: 7px; border-radius: 50%; background: #9cc59a; box-shadow: 0 0 0 3px rgba(156,197,154,.2); }
.sc-x { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(246,240,231,.08); cursor: pointer; display: grid; place-items: center; position: relative; z-index: 1; transition: background .4s; }
.sc-x:hover { background: rgba(246,240,231,.18); }
.sc-x svg { width: 16px; height: 16px; fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linecap: round; }

/* Messages */
.sc-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 18px 10px; display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: rgba(43,32,24,.2) transparent;
}
.sc-msg {
  max-width: 86%; padding: 12px 16px; border-radius: 16px;
  font-size: 14.5px; line-height: 1.55; font-weight: 300;
  animation: scIn .5s var(--ease) both;
}
.sc-msg p { margin: 10px 0 0; }
.sc-msg a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }
.sc-msg em { font-family: var(--serif); font-size: 1.12em; }
.sc-msg--bot { align-self: flex-start; background: var(--cream); border: 1px solid rgba(43,32,24,.07); border-bottom-left-radius: 5px; }
.sc-msg--user { align-self: flex-end; background: var(--umber); color: var(--cream); border-bottom-right-radius: 5px; }
@keyframes scIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sc-dots { display: inline-flex; gap: 5px; padding: 4px 0; }
.sc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--stone); animation: scDot 1.2s infinite ease-in-out; }
.sc-dots i:nth-child(2) { animation-delay: .15s; }
.sc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes scDot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.sc-card { display: flex; gap: 12px; align-items: center; }
.sc-card img { width: 58px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.sc-card strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.1; }
.sc-card span { display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--clay); line-height: 1.5; }

.sc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sc-list li { display: flex; flex-direction: column; }
.sc-list strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.sc-list span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--clay); }
.sc-list--plain span { font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--earth); }

/* Quick replies */
.sc-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 6px 18px 12px; }
.sc-chips:empty { display: none; }
.sc-chip {
  border: 1px solid rgba(43,32,24,.22); background: transparent; color: var(--umber);
  border-radius: 100px; padding: 8px 14px; cursor: pointer;
  font: 400 12.5px/1.2 var(--sans);
  animation: scIn .45s var(--ease) both;
  transition: background .35s var(--ease), color .35s, border-color .35s;
}
.sc-chip:hover { background: var(--umber); color: var(--cream); border-color: var(--umber); }

/* Input */
.sc-input { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid rgba(43,32,24,.1); background: var(--cream); }
.sc-input input {
  flex: 1; min-width: 0; border: 1px solid rgba(43,32,24,.14); background: #fffaf3; color: var(--umber);
  border-radius: 100px; padding: 12px 16px; font: 300 16px/1.2 var(--sans); outline: none;
  transition: border-color .35s;
}
.sc-input input::placeholder { color: var(--muted); opacity: .8; font-size: 14px; }
.sc-input input:focus { border-color: var(--clay); }
.sc-input button {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--umber); display: grid; place-items: center; transition: background .4s;
}
.sc-input button:hover { background: var(--clay); }
.sc-input button svg { width: 18px; height: 18px; fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Mobile */
@media (max-width: 760px) {
  .sc { right: 16px; bottom: 16px; }
  .sc-launch { height: 56px; padding: 0 22px 0 18px; font-size: 12px; }
  .sc-teaser { bottom: 70px; max-width: 220px; }
  .sc-panel {
    position: fixed; left: 10px; right: 10px; bottom: 80px; width: auto;
    height: min(620px, calc(100svh - 100px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .sc *, .sc *::before { animation: none !important; }
}

/* ===== Dark Luxe theme overrides ===== */
.sc-launch { background: linear-gradient(135deg, #f3cf98 0%, #c98f4c 100%); color: #0d0a08; }
.sc-teaser { background: #1e1712; color: var(--cream); border-color: rgba(226,178,112,.25); box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.sc-teaser strong { color: var(--gold); }
.sc-teaser__x { color: rgba(239,228,211,.5); }
.sc-teaser__x:hover { background: rgba(239,228,211,.08); }
.sc-panel { background: #120e0b; color: var(--cream); border-color: rgba(226,178,112,.2); box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.sc-head { background: #1a1410; border-bottom: 1px solid rgba(226,178,112,.15); }
.sc-avatar { background: #0d0a08; border-color: rgba(226,178,112,.3); }
.sc-title { color: var(--cream); }
.sc-body { scrollbar-color: rgba(226,178,112,.25) transparent; }
.sc-msg--bot { background: #1e1712; border-color: rgba(239,228,211,.07); color: var(--cream); }
.sc-msg--user { background: linear-gradient(135deg, #f3cf98, #c98f4c); color: #0d0a08; }
.sc-msg a { color: var(--gold); }
.sc-list--plain span { color: rgba(239,228,211,.65); }
.sc-chip { border-color: rgba(226,178,112,.35); color: var(--cream); }
.sc-chip:hover { background: var(--gold); color: #0d0a08; border-color: var(--gold); }
.sc-input { background: #15100c; border-top-color: rgba(239,228,211,.08); }
.sc-input input { background: #0d0a08; border-color: rgba(239,228,211,.14); color: var(--cream); }
.sc-input input::placeholder { color: rgba(239,228,211,.4); }
.sc-input input:focus { border-color: var(--gold); }
.sc-input button { background: var(--gold); }
.sc-input button:hover { background: #f3cf98; }
.sc-input button svg { stroke: #0d0a08; }
