/* Deal Concierge — chat recommender widget ("Night Market": square, hairlines, mono labels) */
.cc-launch {
    position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; align-items: center; gap: 12px;
    height: 56px; padding: 0 20px 0 8px; border: 1px solid var(--line-2); color: var(--ink); background: var(--surface);
    font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35); transition: border-color .2s, transform .2s;
}
.cc-launch:hover { border-color: var(--ink); transform: translateY(-2px); }
.cc-launch img { width: 40px; height: 40px; object-fit: contain; }
.cc-launch::after { content: ''; width: 7px; height: 7px; background: var(--accent); margin-left: 2px; }
.cc-launch.hide { transform: translateY(8px); opacity: 0; pointer-events: none; }
/* drag to move (touch-action: none so a finger drag moves the button instead of scrolling) */
.cc-launch { touch-action: none; }
.cc-launch.dragging, .cc.dragging { transition: none; cursor: grabbing; }
.cc-launch.dragging { transform: scale(1.04); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
@media (min-width: 561px) { .cc-head { cursor: grab; touch-action: none; } .cc-head button { cursor: pointer; } }

.cc {
    position: fixed; right: 24px; bottom: 24px; z-index: 120; width: 430px; height: min(700px, calc(100vh - 48px));
    background: var(--bg); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); display: flex; flex-direction: column;
    overflow: hidden; transform: translateY(14px); opacity: 0; pointer-events: none;
    transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s;
}
.cc.on { transform: none; opacity: 1; pointer-events: auto; }
.cc-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.cc-head img { width: 38px; height: 38px; object-fit: contain; }
.cc-head b { display: block; font-family: var(--display); font-weight: 900; font-size: 24px; line-height: .95; text-transform: uppercase; }
.cc-head span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.cc-head .live { display: inline-block; width: 7px; height: 7px; border-radius: 0; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.cc-head .icon-btn { color: var(--ink); margin-left: auto; width: 36px; height: 36px; }
.cc-head .icon-btn:hover { background: var(--surface-2); }
.cc-head .icon-btn + .icon-btn { margin-left: 0; }
.cc-head .icon-btn svg { width: 18px; height: 18px; }

.cc-body { flex: 1; overflow-y: auto; padding: 18px 14px 10px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
/* never squash messages to fit: a scroll container (the carousel) would otherwise shrink to 0 and scroll inside itself */
.cc-body > * { flex-shrink: 0; }
.cc-msg { max-width: 88%; padding: 11px 14px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; animation: cc-in .2s ease-out; border-radius: 0; }
@keyframes cc-in { from { opacity: 0; transform: translateY(6px); } }
.cc-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.cc-msg.me { align-self: flex-end; background: var(--ink); color: var(--bg); }
.cc-msg.err { border-color: var(--bad); color: var(--bad); background: transparent; }
.cc-added { align-self: flex-start; display: flex; gap: 8px; align-items: flex-start; max-width: 88%; padding: 9px 12px; border: 1px solid var(--good); color: var(--ink); font-size: 13px; line-height: 1.45; }
.cc-added svg { color: var(--good); flex: 0 0 auto; margin-top: 2px; }
.cc-added a { color: var(--accent-ink); text-decoration: underline; }
.cc-typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); }
.cc-typing i { width: 6px; height: 6px; background: var(--ink-3); animation: cc-dot 1.2s infinite; }
.cc-typing i:nth-child(2) { animation-delay: .15s; } .cc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cc-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.cc-cards { display: grid; grid-auto-flow: column; grid-auto-columns: 152px; gap: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; border-left: 1px solid var(--line); }
.cc-cards::-webkit-scrollbar { display: none; }
.cc-card { background: var(--surface); border: 1px solid var(--line); border-left: 0; display: flex; flex-direction: column; }
.cc-card a { display: block; color: var(--ink); }
.cc-card .im { aspect-ratio: 4 / 5; background: var(--img-bg); position: relative; }
.cc-card .im img { width: 100%; height: 100%; object-fit: cover; }
.cc-card .im .badge { position: absolute; top: 6px; left: 6px; }
.cc-card .b { padding: 9px 10px 10px; display: grid; gap: 4px; }
.cc-card .t { font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.cc-card .r { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-card .p { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; }
.cc-card .p s { font-family: var(--mono); color: var(--ink-3); font-weight: 400; font-size: 10px; margin-left: 4px; }
.cc-card button { margin: 0; height: 34px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.cc-card button:hover { background: var(--surface-2); }
.cc-card button.in { background: var(--accent); color: var(--on-accent); }

.cc-basket { background: var(--surface); border: 1px solid var(--line-2); }
.cc-basket-head { padding: 14px; border-bottom: 1px solid var(--line); background: transparent; }
.cc-basket-head .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.cc-basket-head b { display: block; font-family: var(--display); font-weight: 900; font-size: 26px; line-height: .95; text-transform: uppercase; margin-top: 6px; }
.cc-budget { margin-top: 10px; height: 4px; background: var(--line); }
.cc-budget i { display: block; height: 100%; background: var(--accent); }
.cc-budget-t { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.cc-bi { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--ink); }
.cc-bi:first-of-type { border-top: 0; }
.cc-bi img { width: 46px; height: 46px; object-fit: cover; background: var(--img-bg); }
.cc-bi .t { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cc-bi .w { font-size: 12px; color: var(--ink-3); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-bi .p { font-family: var(--display); font-weight: 800; font-size: 20px; white-space: nowrap; }
.cc-basket-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.cc-basket-foot b { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; }
.cc-basket-foot span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }

.cc-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 14px 10px; background: var(--bg); }
.cc-sugg button { height: 32px; padding: 0 11px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.cc-sugg button:hover { border-color: var(--ink); color: var(--ink); }
.cc-foot { display: flex; align-items: flex-end; gap: 0; padding: 0; border-top: 1px solid var(--line-2); background: var(--surface); }
.cc-foot textarea { flex: 1; resize: none; border: 0; border-radius: 0; padding: 16px 16px; height: 54px; max-height: 120px; font-size: 14.5px; line-height: 1.45; outline: none; background: transparent; color: var(--ink); }
.cc-foot textarea::placeholder { color: var(--ink-3); }
.cc-foot textarea:focus { box-shadow: none; background: transparent; }
.cc-foot button { width: 58px; height: 54px; border: 0; border-left: 1px solid var(--line-2); border-radius: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: 0 0 auto; }
.cc-foot button:disabled { opacity: .4; }
.cc-foot button svg { width: 18px; height: 18px; }
.cc-note { text-align: left; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 8px 16px 10px; background: var(--surface); border-top: 1px solid var(--line); }

/* first-visit greeting above the launcher */
.cc-hello {
    position: fixed; right: 24px; bottom: 94px; z-index: 81; width: 320px; max-width: calc(100vw - 28px);
    padding: 16px 44px 18px 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35); cursor: pointer;
    opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1);
}
.cc-hello.on { opacity: 1; transform: none; pointer-events: auto; }
.cc-hello::after { /* notch pointing at the launcher */
    content: ''; position: absolute; right: 30px; bottom: -7px; width: 12px; height: 12px; background: var(--surface);
    border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transform: rotate(45deg);
}
.cc-hello .k { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.cc-hello .k { gap: 10px; }
.cc-hello .k img { width: 34px; height: 34px; object-fit: contain; }
.cc-hello .k span { display: flex; align-items: center; gap: 8px; }
.cc-hello .k i { width: 7px; height: 7px; background: var(--accent); }
.cc-hello b { display: block; font-family: var(--display); font-weight: 900; font-size: 27px; line-height: .95; text-transform: uppercase; margin: 10px 0 8px; }
.cc-hello p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.cc-hello .go { display: inline-block; margin-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.cc-hello .x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-3); }
.cc-hello .x:hover { color: var(--ink); background: var(--surface-2); }
.cc-hello .x svg { width: 16px; height: 16px; }
.cc-hello .bar { position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--accent); transform-origin: left; }
.cc-hello.on .bar { animation: cc-hello-bar var(--hello-ms, 6500ms) linear forwards; }
.cc-hello.hold .bar { animation-play-state: paused; }
@keyframes cc-hello-bar { to { transform: scaleX(0); } }

@media (max-width: 560px) {
    .cc { right: 0; bottom: 0; width: 100%; height: 100%; border: 0; }
    .cc-launch { right: 14px; bottom: 14px; height: 50px; padding: 0 16px 0 6px; }
    .cc-launch img { width: 36px; height: 36px; }
    .cc-hello { right: 14px; bottom: 76px; }
    .cc-head .cc-tail { display: none; }   /* keep the header subtitle to one line */
    .cc-hello b { font-size: 24px; }
}
