/* Concierge Live Chat — widget styles (dark theme edition) */
:root {
  --cac-accent: #fcd300;
  --cac-accent-deep: #c79a00;
  --cac-accent-soft: #ffe45c;
  --cac-ink: #201a08;
  --cac-bg: #ffffff;
  --cac-surface: #f6f4ee;
  --cac-surface-2: #f1efe9;
  --cac-text: #1e1c17;
  --cac-muted: #6f6a5e;
  --cac-faint: #a09a8b;
  --cac-line: rgba(30,28,23,.12);
  --cac-link: #8a6417;
  --cac-launcher-from: #ffe45c;
  --cac-launcher-mid: #fcd300;
  --cac-launcher-to: #c79a00;
  --cac-launcher-ring: rgba(252,211,0,.5);
  --cac-focus-ring: rgba(201,162,39,.28);
}

#cac-root { position: fixed; z-index: 999999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
#cac-root.cac-right { right: 22px; bottom: 22px; }
#cac-root.cac-left { left: 22px; bottom: 22px; }

/* Launcher button — brand gradient with metallic sheen, green "we're online" dot */
#cac-launcher {
  position: relative; width: 68px; height: 68px; border-radius: 50%;
  border: 2px solid #ffffff;
  background: radial-gradient(circle at 32% 28%, var(--cac-launcher-from) 0%, var(--cac-launcher-mid) 45%, var(--cac-launcher-to) 100%);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 14px 30px rgba(0,0,0,.55),
    0 3px 8px rgba(0,0,0,.4),
    inset 0 1px 2px rgba(255,255,255,.55),
    inset 0 -3px 6px rgba(0,0,0,.28);
  transition: transform .25s ease, box-shadow .25s ease; padding: 0;
}
#cac-launcher:hover {
  transform: scale(1.05);
  box-shadow:
    0 18px 36px rgba(0,0,0,.6),
    0 3px 8px rgba(0,0,0,.4),
    inset 0 1px 2px rgba(255,255,255,.6),
    inset 0 -3px 6px rgba(0,0,0,.28);
}
#cac-launcher::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 1.5px solid var(--cac-launcher-ring); animation: cac-pulse 3.8s ease-out infinite; pointer-events: none;
}
@keyframes cac-pulse {
  0% { transform: scale(1); opacity: .65; }
  70% { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}
#cac-root.cac-open #cac-launcher::after { display: none; }
#cac-launcher .cac-car-icon { width: 36px; height: 36px; display: block; color: var(--cac-ink); filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
#cac-launcher .cac-online-dot {
  position: absolute; top: 1px; right: 1px; width: 15px; height: 15px;
  background: #22c55e; border: 2.5px solid #ffffff; border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0,0,0,.3);
}
#cac-launcher .cac-close-x { display: none; color: var(--cac-ink); font-size: 28px; line-height: 1; font-weight: 400; }
#cac-root.cac-open #cac-launcher .cac-car-icon { display: none; }
#cac-root.cac-open #cac-launcher .cac-online-dot { display: none; }
#cac-root.cac-open #cac-launcher .cac-close-x { display: block; }

/* Attention nudge */
#cac-nudge {
  position: absolute; bottom: 78px; right: 0; white-space: nowrap;
  background: var(--cac-surface-2); color: var(--cac-text); border: 1px solid var(--cac-line);
  border-radius: 14px; padding: 10px 15px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(0,0,0,.5); opacity: 0; transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease; pointer-events: none;
}
#cac-root.cac-left #cac-nudge { right: auto; left: 0; }
#cac-root.cac-show-nudge #cac-nudge { opacity: 1; transform: translateY(0); }

/* Panel — dark, matches the site theme */
#cac-panel {
  position: absolute; bottom: 86px; right: 0; width: 380px; max-width: calc(100vw - 44px);
  height: 560px; max-height: calc(100vh - 140px);
  background: var(--cac-bg); border: 1px solid var(--cac-line); border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 26px 70px rgba(0,0,0,.55), 0 4px 14px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(16px) scale(.97); transform-origin: bottom right;
  transition: opacity .28s ease, transform .28s ease; pointer-events: none;
}
#cac-root.cac-left #cac-panel { right: auto; left: 0; transform-origin: bottom left; }
#cac-root.cac-open #cac-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

#cac-header {
  background: var(--cac-bg);
  border-bottom: 1px solid var(--cac-line); padding: 14px 18px;
  display: flex; align-items: center;
}
#cac-header-text { flex: 1; min-width: 0; }
#cac-header-name { color: var(--cac-text); font-size: 16px; font-weight: 700; }
#cac-header-sub { color: var(--cac-muted); font-size: 12.5px; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
#cac-online-dot { width: 9px; height: 9px; border-radius: 50%; background: #1faa53; box-shadow: 0 0 6px #1faa53; display: inline-block; animation: cac-dotpulse 2.8s ease-in-out infinite; }
@keyframes cac-dotpulse { 0%, 100% { box-shadow: 0 0 4px #1faa53; } 50% { box-shadow: 0 0 10px #1faa53; } }

#cac-messages { flex: 1; overflow-y: auto; padding: 14px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--cac-bg); }
#cac-messages::-webkit-scrollbar { width: 6px; }
#cac-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }

/* "Today" divider — a real live-chat touch */
.cac-day-divider { display: flex; align-items: center; gap: 10px; margin: 2px 4px 6px; }
.cac-day-divider::before, .cac-day-divider::after { content: ""; flex: 1; height: 1px; background: var(--cac-line); }
.cac-day-divider span { font-size: 11px; color: var(--cac-faint); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }

/* Message rows: bubble + small timestamp, like a real chat app */
.cac-msgrow { display: flex; flex-direction: column; max-width: 88%; animation: cac-in .25s ease; }
.cac-bot-row { align-self: flex-start; align-items: flex-start; }
.cac-user-row { align-self: flex-end; align-items: flex-end; }
.cac-time { font-size: 10.5px; color: var(--cac-faint); margin-top: 3px; padding: 0 4px; }

.cac-msg { padding: 11px 15px; border-radius: 16px; font-size: 15px; line-height: 1.55; word-wrap: break-word; }
@keyframes cac-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cac-bot { background: var(--cac-surface); color: var(--cac-text); border: 1px solid var(--cac-line); border-bottom-left-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.cac-user { background: linear-gradient(135deg, var(--cac-accent-soft) 0%, var(--cac-accent) 100%); color: var(--cac-ink); border-bottom-right-radius: 5px; font-weight: 500; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.cac-msg a { color: var(--cac-link); font-weight: 600; }

.cac-typing { display: flex; gap: 5px; padding: 13px 17px; align-self: flex-start; }
.cac-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--cac-muted); opacity: .5; animation: cac-blink 1.1s infinite; }
.cac-typing span:nth-child(2) { animation-delay: .18s; } .cac-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes cac-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

#cac-chips { display: flex; gap: 8px; padding: 4px 14px 12px; flex-wrap: wrap; background: var(--cac-bg); }
.cac-chip {
  border: 1px solid var(--cac-line); background: var(--cac-surface-2); color: var(--cac-accent);
  border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.cac-chip:hover { background: var(--cac-surface); border-color: var(--cac-accent); }

/* Quote form */
#cac-leadform { padding: 6px 14px 12px; background: var(--cac-bg); display: flex; flex-direction: column; gap: 8px; }
#cac-leadform input, #cac-leadform select {
  background: var(--cac-surface-2); border: 1px solid var(--cac-line); border-radius: 10px;
  color: var(--cac-text); padding: 11px 12px; font-size: 14px; width: 100%; box-sizing: border-box;
}
#cac-leadform input::placeholder { color: var(--cac-faint); }
#cac-leadform input:focus, #cac-leadform select:focus { outline: none; border-color: var(--cac-accent); box-shadow: 0 0 0 3px var(--cac-focus-ring); }
#cac-leadform select option { background: var(--cac-surface-2); color: var(--cac-text); }
#cac-leadform .cac-row { display: flex; gap: 8px; }
#cac-leadform .cac-row > * { flex: 1; }

#cac-inputbar { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--cac-line); background: var(--cac-bg); align-items: center; }
#cac-input {
  flex: 1; background: var(--cac-surface-2); border: 1px solid var(--cac-line); border-radius: 999px;
  color: var(--cac-text); padding: 12px 17px; font-size: 15px;
}
#cac-input::placeholder { color: var(--cac-faint); }
#cac-input:focus { outline: none; border-color: var(--cac-accent); box-shadow: 0 0 0 3px var(--cac-focus-ring); }
#cac-send {
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer; flex: 0 0 48px;
  background: linear-gradient(135deg, var(--cac-accent-soft) 0%, var(--cac-accent) 100%); display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease; box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
#cac-send:hover { transform: scale(1.08); }
#cac-send svg { width: 22px; height: 22px; color: var(--cac-ink); }
#cac-send:disabled { opacity: .5; cursor: default; transform: none; }

@media (max-width: 480px) {
  #cac-root.cac-right { right: 12px; bottom: 12px; }
  #cac-root.cac-left { left: 12px; bottom: 12px; }
  #cac-panel { width: calc(100vw - 24px); bottom: 84px; height: calc(100vh - 180px); }
  #cac-nudge { display: none; }
}

/* Mechanic face launcher + header avatar (FRS variants) */
#cac-launcher .cac-face { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
#cac-root.cac-open #cac-launcher .cac-face { display: none; }
#cac-header .cac-face-header { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; margin-right: 12px; border: 2px solid rgba(255,255,255,.28); }

/* White widget (famouscitylimo.com original look) */
#cac-root { color-scheme: light; }
#cac-panel { box-shadow: 0 26px 70px rgba(20,16,4,.28), 0 4px 14px rgba(20,16,4,.12); }
#cac-nudge { box-shadow: 0 10px 26px rgba(20,16,4,.22); }
#cac-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 3px; }
#cac-header .cac-face-header { border-color: rgba(30,28,23,.18); }
.cac-chip { box-shadow: 0 2px 6px rgba(20,16,4,.12); }
.cac-bot { box-shadow: 0 2px 6px rgba(20,16,4,.10); }
/* Quick-reply chips — simple professional: black text on clean white chips */
.cac-chip { color: #1e1c17; border-color: rgba(30,28,23,.22); background: #ffffff; }
.cac-chip:hover { background: #f2f0ea; border-color: rgba(30,28,23,.35); color: #1e1c17; }
