/* CCTV Camera World AI shopping chat. Scoped under .cwc-root so it does not leak into Luma or Hyvä styles. */
.cwc-root {
    --cwc-color: #0b63ce;
    --cwc-bg: #fff;
    --cwc-fg: #1d2330;
    --cwc-muted: #5d6675;
    --cwc-line: #e3e6eb;
    --cwc-soft: #f4f6f9;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2147483000;
    font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--cwc-fg);
}
.cwc-root.cwc-left { right: auto; left: 20px; }
.cwc-root *, .cwc-root *::before, .cwc-root *::after { box-sizing: border-box; }
.cwc-root [hidden] { display: none !important; }
.cwc-root svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cwc-root button { font: inherit; cursor: pointer; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; text-shadow: none; line-height: normal; color: inherit; min-height: 0; }
.cwc-root button:hover, .cwc-root button:focus, .cwc-root button:active { box-shadow: none; }
.cwc-root svg { flex: none; }

.cwc-root .cwc-launcher {
    display: flex; align-items: center; gap: 8px;
    height: 52px; padding: 0 20px 0 16px;
    border: 0; border-radius: 26px;
    background: var(--cwc-color); color: #fff;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .25);
    font-weight: 600;
}
.cwc-root .cwc-launcher:hover { filter: brightness(1.08); }
.cwc-root .cwc-launcher { position: relative; }
.cwc-root .cwc-live-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #d92d20; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.cwc-root .cwc-live-badge.cwc-live-badge-dot { min-width: 12px; width: 12px; height: 12px; padding: 0; top: -2px; right: -2px; }
.cwc-root .cwc-live { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: #fff8e6; border-bottom: 1px solid var(--cwc-line); font-size: 13px; }
.cwc-root .cwc-live[hidden], .cwc-root .cwc-live-badge[hidden] { display: none; }
.cwc-root .cwc-live-open { flex: none; border: 0; border-radius: 14px; padding: 5px 12px; background: #047857; color: #fff; font-weight: 600; font-size: 12px; cursor: pointer; }
.cwc-root .cwc-live-open::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #6ee7b7; vertical-align: 1px; }
.cwc-root .cwc-live-open:hover { background: #065f46; }
.cwc-root .cwc-launcher:focus-visible, .cwc-root button:focus-visible, .cwc-root a:focus-visible, .cwc-root .cwc-input:focus-visible, .cwc-root .cwc-select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--cwc-color) 45%, transparent); outline-offset: 2px;
}

.cwc-root .cwc-panel {
    display: flex; flex-direction: column;
    width: 380px; height: min(620px, calc(100vh - 40px));
    background: var(--cwc-bg);
    border: 1px solid var(--cwc-line); border-radius: 14px;
    box-shadow: 0 16px 48px rgba(16, 24, 40, .22);
    overflow: hidden;
}
.cwc-root .cwc-head {
    display: flex; align-items: center; gap: 4px;
    padding: 12px 10px 12px 16px;
    background: var(--cwc-color); color: #fff;
}
.cwc-root .cwc-title { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.cwc-root .cwc-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwc-root .cwc-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .22); }
.cwc-root .cwc-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.cwc-root .cwc-icon:hover { background: rgba(127, 127, 127, .16); }

.cwc-root .cwc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--cwc-soft); }
.cwc-root .cwc-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; word-wrap: break-word; overflow-wrap: anywhere; }
.cwc-root .cwc-msg p { margin: 0 0 6px; }
.cwc-root .cwc-msg p:last-child { margin-bottom: 0; }
.cwc-root .cwc-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.cwc-root .cwc-msg li { margin: 2px 0; }
.cwc-root .cwc-msg a { color: var(--cwc-color); text-decoration: underline; }
.cwc-root .cwc-assistant { align-self: flex-start; background: var(--cwc-bg); border: 1px solid var(--cwc-line); border-bottom-left-radius: 4px; }
.cwc-root .cwc-user { align-self: flex-end; background: var(--cwc-color); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.cwc-root .cwc-notice { align-self: center; background: #fff4e5; color: #7a4100; font-size: 13px; }

.cwc-root .cwc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cwc-root .cwc-chip { padding: 6px 11px; border: 1px solid var(--cwc-color); border-radius: 16px; background: var(--cwc-bg); color: var(--cwc-color); font-size: 13px; text-align: left; }
.cwc-root .cwc-chip:hover { background: color-mix(in srgb, var(--cwc-color) 8%, #fff); }

.cwc-root .cwc-cards { display: flex; flex-direction: column; gap: 8px; }
.cwc-root .cwc-card { display: flex; gap: 10px; padding: 10px; background: var(--cwc-bg); border: 1px solid var(--cwc-line); border-radius: 10px; }
.cwc-root .cwc-card img, .cwc-root .cwc-noimg { flex: none; width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: var(--cwc-soft); }
.cwc-root .cwc-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cwc-root .cwc-card-name { font-weight: 600; color: var(--cwc-fg); text-decoration: none; line-height: 1.3; }
a.cwc-card-name:hover { color: var(--cwc-color); text-decoration: underline; }
.cwc-root .cwc-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-weight: 700; }
.cwc-root .cwc-price s { color: var(--cwc-muted); font-weight: 400; font-size: 12px; }
.cwc-root .cwc-stock { font-size: 12px; font-weight: 500; color: #127a3a; }
.cwc-root .cwc-stock.cwc-out { color: #b42318; }
.cwc-root .cwc-card-actions { display: flex; gap: 6px; margin-top: 2px; }
.cwc-root .cwc-select { flex: 1; min-width: 0; height: 32px; padding: 0 6px; border: 1px solid var(--cwc-line); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; }
.cwc-root .cwc-add { height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--cwc-color); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cwc-root .cwc-add:disabled { opacity: .7; cursor: default; }

.cwc-root .cwc-cart-cta, .cwc-root .cwc-handoff-cta { flex-shrink: 0;
    display: block; align-self: stretch; text-align: center;
    padding: 10px 12px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.cwc-root .cwc-cart-cta { background: #127a3a; color: #fff !important; }
.cwc-root .cwc-cart-cta:hover { filter: brightness(1.08); }
.cwc-root .cwc-handoff-cta { align-self: flex-start; padding: 5px 12px; border: 1px solid #b5d4f4; border-radius: 14px; background: #e6f1fb; color: #185fa5 !important; font-size: 13px; font-weight: 400; }
.cwc-root .cwc-handoff-cta:hover { background: #d4e6f8; }

.cwc-root .cwc-articles { display: flex; flex-direction: column; gap: 4px; align-self: stretch; padding: 8px 12px; border: 1px solid var(--cwc-line); border-radius: 10px; background: var(--cwc-bg); font-size: 13px; }
.cwc-root .cwc-articles-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--cwc-muted); }
.cwc-root .cwc-articles a { color: var(--cwc-color); text-decoration: underline; }
.cwc-root a.cwc-handoff-cta { text-decoration: none; }
.cwc-root .cwc-articles a.cwc-article-shop { font-weight: 600; }
.cwc-root .cwc-rate { display: flex; align-items: center; gap: 2px; align-self: flex-start; color: var(--cwc-muted); font-size: 12px; }
.cwc-root .cwc-rate span { margin-right: 4px; }
.cwc-root .cwc-rate svg { width: 16px; height: 16px; }

.cwc-root .cwc-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--cwc-bg); border: 1px solid var(--cwc-line); border-radius: 12px; }
.cwc-root .cwc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--cwc-muted); animation: cwc-dot 1.2s infinite ease-in-out; }
.cwc-root .cwc-typing span:nth-child(2) { animation-delay: .15s; }
.cwc-root .cwc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cwc-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .cwc-typing span { animation: none; opacity: .6; } }

.cwc-root .cwc-foot { border-top: 1px solid var(--cwc-line); padding: 10px 12px 8px; background: var(--cwc-bg); }
.cwc-root .cwc-form { display: flex; align-items: flex-end; gap: 8px; }
.cwc-root .cwc-input {
    flex: 1; resize: none; min-height: 40px; max-height: 120px;
    padding: 9px 11px; border: 1px solid var(--cwc-line); border-radius: 10px;
    font: inherit; color: var(--cwc-fg); background: #fff;
}
.cwc-root .cwc-send { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: var(--cwc-color); color: #fff; }
.cwc-root .cwc-send:disabled { opacity: .55; cursor: default; }
.cwc-root .cwc-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.cwc-root .cwc-disclaimer { font-size: 11px; color: var(--cwc-muted); line-height: 1.3; }
/* "Talk to a person": a small light blue pill in the bottom right corner of the window, store hours on its left */
.cwc-root .cwc-person { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.cwc-root .cwc-person-hours { flex: 1; min-width: 0; font-size: 11px; line-height: 1.3; color: var(--cwc-muted); }
.cwc-root .cwc-person-btn { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid #b5d4f4; border-radius: 14px; background: #e6f1fb; color: #185fa5; font-size: 12px; font-weight: 400; line-height: 1.4; white-space: nowrap; }
.cwc-root .cwc-person-btn:hover { background: #d4e6f8; border-color: #85b7eb; }
.cwc-root .cwc-person-btn svg { width: 13px; height: 13px; stroke-width: 1.8; }
.cwc-root .cwc-person-dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.cwc-root .cwc-person.cwc-online .cwc-person-dot { display: inline-block; }
.cwc-root .cwc-handoff-link { flex: none; border: 0; background: none; padding: 2px 0; color: var(--cwc-color); font-size: 12px; font-weight: 600; text-decoration: underline; }

@media (max-width: 600px) {
    .cwc-root { bottom: 14px; right: 14px; }
    .cwc-root.cwc-left { left: 14px; }
    /* 0.3.8: start below the site header (--cwc-top is set by chat.js; 0 = full screen) */
    .cwc-root.cwc-open { inset: var(--cwc-top, 0px) 0 0 0; }
    .cwc-root.cwc-open .cwc-panel { width: 100%; height: 100%; height: calc(100dvh - var(--cwc-top, 0px)); border-radius: 0; border: 0; border-top: 1px solid rgba(0, 0, 0, .18); box-shadow: 0 -2px 8px rgba(0, 0, 0, .12); }
    .cwc-root .cwc-input { font-size: 16px; } /* stops iOS zoom on focus */
}
/* The header button's own styles are inline in header-button.phtml (first paint). With it present, the floating
   button is not shown. */
.cwc-root.cwc-hdr .cwc-launcher { display: none !important; }
@media print { .cwc-root { display: none; } }
