/* The Camera Guys website chat (Mia). Scoped under #tcgc so the theme can't reach in. */
#tcgc {
  --c-ink: #121418;
  --c-raise: #1b1e23;
  --c-line: #2c3037;
  --c-text: #f1eee8;
  --c-mute: #9ea3ab;
  --c-gold: #d69942;
  --c-gold-deep: #b97d2c;
  --c-sam: #8fc7a8;
  --c-r: 14px;
  position: fixed; right: 20px; bottom: 20px; z-index: 99990;
  font: 400 15px/1.5 "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
}
#tcgc *, #tcgc *::before, #tcgc *::after { box-sizing: border-box; }
#tcgc [hidden] { display: none !important; }
#tcgc button, #tcgc input, #tcgc textarea { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; margin: 0; }
#tcgc p { margin: 0; }
#tcgc a { color: var(--c-gold); text-decoration: underline; text-underline-offset: 2px; }
.tcgc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Focus brackets: the viewfinder corners that snap in once, like autofocus. */
#tcgc .tcgc-frame { position: absolute; inset: -7px; pointer-events: none; }
#tcgc .tcgc-frame i { position: absolute; width: 11px; height: 11px; border: 2px solid var(--c-gold); transition: transform .5s cubic-bezier(.2, .9, .25, 1.25), opacity .3s; opacity: 0; }
#tcgc .tcgc-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; transform: translate(-9px, -9px); }
#tcgc .tcgc-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; transform: translate(9px, -9px); }
#tcgc .tcgc-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; transform: translate(-9px, 9px); }
#tcgc .tcgc-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; transform: translate(9px, 9px); }
#tcgc.is-ready .tcgc-launch .tcgc-frame i, #tcgc.is-open .tcgc-mono .tcgc-frame i { opacity: 1; transform: none; }
#tcgc.is-ready .tcgc-launch .tcgc-frame i { transition-delay: .6s; }
#tcgc.is-open .tcgc-mono .tcgc-frame i { transition-delay: .12s; }

/* Launcher */
#tcgc .tcgc-launch {
  position: relative; display: flex; align-items: center; gap: 10px; margin-left: auto;
  height: 52px; padding: 0 22px 0 18px; border: 0; border-radius: 26px; cursor: pointer;
  background: var(--c-gold); color: #17130c; font-weight: 900; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: background .2s, transform .2s;
}
#tcgc .tcgc-launch::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #c83a2b; box-shadow: 0 0 0 3px rgba(200, 58, 43, .25); }
#tcgc .tcgc-launch:hover { background: #e2a650; }
#tcgc .tcgc-launch:focus-visible, #tcgc button:focus-visible, #tcgc input:focus-visible, #tcgc textarea:focus-visible, #tcgc a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#tcgc.is-open .tcgc-launch { transform: scale(.92); background: var(--c-raise); color: var(--c-text); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
#tcgc.is-open .tcgc-launch .tcgc-launch__label::after { content: " · close"; font-weight: 400; color: var(--c-mute); }
#tcgc .tcgc-badge { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #c83a2b; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }

/* Nudge */
#tcgc .tcgc-nudge {
  position: absolute; right: 0; bottom: 66px; width: 270px; padding: 14px 34px 14px 16px;
  background: var(--c-text); color: #1b1d21; border-radius: var(--c-r) var(--c-r) 4px var(--c-r);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35); font-size: 14px; cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s;
}
#tcgc .tcgc-nudge.is-in { opacity: 1; transform: none; }
#tcgc .tcgc-nudge__close { position: absolute; top: 4px; right: 6px; width: 26px; height: 26px; border: 0; background: none; color: #555; font-size: 18px; cursor: pointer; }

/* Panel */
#tcgc .tcgc-panel {
  position: absolute; right: 0; bottom: 68px; width: 384px; height: min(640px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-ink); border: 1px solid var(--c-line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  transform-origin: 100% 100%; opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity .2s, transform .22s cubic-bezier(.2, .8, .3, 1);
}
#tcgc.is-open .tcgc-panel { opacity: 1; transform: none; }
#tcgc .tcgc-head { display: flex; align-items: center; gap: 14px; padding: 16px 14px 14px 22px; border-bottom: 1px solid var(--c-line); background: var(--c-raise); }
#tcgc .tcgc-mono {
  position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  background: #262a30; color: var(--c-gold); font-weight: 900; font-size: 18px; border-radius: 2px;
}
#tcgc .tcgc-mono .tcgc-frame { inset: -5px; }
#tcgc .tcgc-mono .tcgc-frame i { width: 8px; height: 8px; border-width: 1.5px; }
#tcgc .tcgc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
#tcgc .tcgc-who strong { font-size: 16px; font-weight: 900; }
#tcgc .tcgc-status { color: var(--c-mute); font-size: 13px; }
#tcgc.is-sam .tcgc-status { color: var(--c-sam); }
#tcgc .tcgc-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--c-mute); cursor: pointer; display: grid; place-items: center; }
#tcgc .tcgc-close:hover { background: #2a2e35; color: var(--c-text); }

/* Conversation */
#tcgc .tcgc-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: #3a3f47 transparent; }
#tcgc .tcgc-msg { display: flex; flex-direction: column; max-width: 88%; }
#tcgc .tcgc-msg--mia, #tcgc .tcgc-msg--sam { align-self: flex-start; }
#tcgc .tcgc-msg--visitor { align-self: flex-end; }
#tcgc .tcgc-bubble { padding: 10px 14px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; }
#tcgc .tcgc-bubble p + p, #tcgc .tcgc-bubble p + ul, #tcgc .tcgc-bubble ul + p { margin-top: 8px; }
#tcgc .tcgc-bubble ul { margin: 6px 0 0; padding-left: 18px; }
#tcgc .tcgc-msg--mia .tcgc-bubble { background: var(--c-raise); border-bottom-left-radius: 4px; }
#tcgc .tcgc-msg--sam .tcgc-bubble { background: #1d2a24; border: 1px solid #2f4a3c; border-bottom-left-radius: 4px; }
#tcgc .tcgc-by { font-size: 12px; font-weight: 700; color: var(--c-sam); margin: 0 0 3px 4px; }
#tcgc .tcgc-msg--visitor .tcgc-bubble { background: var(--c-gold); color: #1a150c; border-bottom-right-radius: 4px; }
#tcgc .tcgc-msg--visitor a { color: #1a150c; }
#tcgc .tcgc-msg--system { align-self: center; max-width: 92%; text-align: center; color: var(--c-mute); font-size: 13px; padding: 2px 8px; }
#tcgc .tcgc-typing .tcgc-bubble { display: flex; gap: 4px; padding: 14px 16px; }
#tcgc .tcgc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-mute); animation: tcgc-dot 1.1s infinite ease-in-out; }
#tcgc .tcgc-typing i:nth-child(2) { animation-delay: .15s; }
#tcgc .tcgc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tcgc-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* Quick replies */
#tcgc .tcgc-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin: 2px 0 4px; }
#tcgc .tcgc-chip { padding: 7px 14px; border: 1px solid var(--c-gold); border-radius: 18px; background: transparent; color: var(--c-gold); font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
#tcgc .tcgc-chip:hover { background: var(--c-gold); color: #1a150c; }

/* Page links */
#tcgc .tcgc-links { display: flex; flex-direction: column; gap: 6px; max-width: 88%; }
#tcgc .tcgc-link { display: block; padding: 10px 14px; border: 1px solid var(--c-line); border-left: 3px solid var(--c-gold); border-radius: 4px 10px 10px 4px; text-decoration: none; color: var(--c-text); background: #16191d; }
#tcgc .tcgc-link:hover { border-color: #444a53; border-left-color: var(--c-gold); background: var(--c-raise); }
#tcgc .tcgc-link strong { display: block; font-weight: 700; }
#tcgc .tcgc-link span { display: block; color: var(--c-mute); font-size: 13px; line-height: 1.4; }

/* Guide price: a quote slip */
#tcgc .tcgc-price { margin: 2px 0; max-width: 92%; padding: 16px 16px 14px; background: #f3efe6; color: #1d1b17; border-radius: 4px; position: relative; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
#tcgc .tcgc-price::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px; background: radial-gradient(circle at 6px 6px, transparent 4px, #f3efe6 4.5px) -6px 0 / 12px 6px repeat-x; }
#tcgc .tcgc-price figcaption { font-weight: 900; font-size: 15px; line-height: 1.3; margin-bottom: 10px; }
#tcgc .tcgc-price dl { margin: 0; }
#tcgc .tcgc-price dl div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dotted #c9c1b1; font-size: 14px; }
#tcgc .tcgc-price dt { color: #3d3a33; }
#tcgc .tcgc-price dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tcgc .tcgc-price__total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 6px; }
#tcgc .tcgc-price__total strong { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
#tcgc .tcgc-price ul { margin: 4px 0 0; padding: 0; list-style: none; color: #6a655a; font-size: 12px; line-height: 1.45; }
#tcgc .tcgc-price li + li { margin-top: 3px; }

/* Hand-off card */
#tcgc .tcgc-hand { max-width: 94%; padding: 14px; border: 1px solid var(--c-gold); border-radius: 12px; background: #1a1712; }
#tcgc .tcgc-hand__lead { font-weight: 700; margin-bottom: 8px; }
#tcgc .tcgc-hand blockquote { margin: 0 0 12px; padding: 0 0 0 12px; border-left: 2px solid var(--c-gold); color: #ddd6c9; font-size: 14px; }
#tcgc .tcgc-hand__fields { display: grid; gap: 8px; margin-bottom: 12px; }
#tcgc .tcgc-hand label { display: grid; gap: 3px; font-size: 12px; color: var(--c-mute); }
#tcgc .tcgc-hand label em { font-style: normal; opacity: .8; }
#tcgc .tcgc-hand input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 8px; background: #101215; font-size: 15px; }
#tcgc .tcgc-hand input:focus { border-color: var(--c-gold); outline: none; }
#tcgc .tcgc-hand__send { width: 100%; height: 42px; border: 0; border-radius: 21px; background: var(--c-gold); color: #1a150c; font-weight: 900; cursor: pointer; }
#tcgc .tcgc-hand__send:disabled { opacity: .7; cursor: default; }
#tcgc .tcgc-hand__err { margin-top: 8px; color: #ff9c8f; font-size: 13px; }
#tcgc .tcgc-hand__done { display: none; }
#tcgc .tcgc-hand.is-sent .tcgc-hand__send { display: none; }
#tcgc .tcgc-hand.is-sent .tcgc-hand__done { display: flex; align-items: center; gap: 8px; color: var(--c-gold); font-weight: 700; }
#tcgc .tcgc-hand.is-sent .tcgc-hand__done::before { content: ""; width: 16px; height: 9px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg) translateY(-3px); }
#tcgc .tcgc-hand.is-sent input { border-color: transparent; background: transparent; padding: 0; height: auto; }

/* Composer */
#tcgc .tcgc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 8px 14px; border-top: 1px solid var(--c-line); }
#tcgc textarea { flex: 1; min-height: 42px; max-height: 120px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 21px; background: #0d0f12; resize: none; line-height: 1.4; font-size: 15px; }
#tcgc textarea::placeholder { color: #7b8089; }
#tcgc textarea:focus { border-color: var(--c-gold); outline: none; }
#tcgc .tcgc-send { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--c-gold); color: #1a150c; display: grid; place-items: center; cursor: pointer; }
#tcgc .tcgc-foot { padding: 0 16px 10px; color: #757a83; font-size: 11.5px; line-height: 1.4; }
#tcgc .tcgc-foot a { color: #9ea3ab; }

/* Phones: a full-height sheet */
@media (max-width: 640px) {
  #tcgc { right: 14px; bottom: 14px; }
  #tcgc .tcgc-launch { height: 48px; padding: 0 18px 0 16px; }
  #tcgc .tcgc-panel { position: fixed; inset: auto 0 0 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  #tcgc.is-open .tcgc-launch { display: none; }
  #tcgc .tcgc-head { padding-top: max(14px, env(safe-area-inset-top)); }
  #tcgc .tcgc-form { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  #tcgc textarea { font-size: 16px; }
  #tcgc .tcgc-nudge { width: min(270px, calc(100vw - 28px)); }
}

@media (prefers-reduced-motion: reduce) {
  #tcgc *, #tcgc *::before, #tcgc *::after { transition-duration: 0s !important; animation-duration: 0s !important; transition-delay: 0s !important; }
}
@media print { #tcgc { display: none; } }

/* Mia's photo: in the launcher, and framed by the focus brackets in the header. */
#tcgc .tcgc-launch__face { width: 34px; height: 34px; margin-left: -8px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #17130c; }
#tcgc .tcgc-launch:has(.tcgc-launch__face) { padding-left: 14px; }
#tcgc .tcgc-launch:has(.tcgc-launch__face)::before { order: 2; position: absolute; left: 38px; bottom: 9px; width: 10px; height: 10px; background: #3cb371; box-shadow: 0 0 0 2px var(--c-gold); }
#tcgc.is-open .tcgc-launch:has(.tcgc-launch__face)::before { box-shadow: 0 0 0 2px var(--c-raise); }
#tcgc .tcgc-mono:has(img) { background: transparent; }
#tcgc .tcgc-mono img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
@media (max-width: 640px) { #tcgc .tcgc-launch__face { width: 30px; height: 30px; } #tcgc .tcgc-launch:has(.tcgc-launch__face)::before { left: 34px; bottom: 8px; } }

/* Launcher states (12 Oct): hidden for a moment, then full "Ask Mia"; once the
   visitor scrolls it shrinks to Mia's photo and online dot; hover, focus, the
   nudge or a reading pause brings the label back. */
#tcgc .tcgc-launch { opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none;
  transition: background .2s, transform .45s cubic-bezier(.2, .9, .25, 1.15), opacity .35s, padding .35s ease, gap .35s ease, box-shadow .3s; }
#tcgc.is-shown .tcgc-launch, #tcgc.is-open .tcgc-launch { opacity: 1; transform: none; pointer-events: auto; }
#tcgc .tcgc-launch__label { display: inline-block; max-width: 110px; overflow: hidden; white-space: nowrap; transition: max-width .35s ease, opacity .25s ease .05s; }
#tcgc .tcgc-launch:has(.tcgc-launch__face)::before { transition: left .35s ease; }
#tcgc.is-compact .tcgc-launch { gap: 0; padding: 0 9px 0 17px; }
#tcgc.is-compact .tcgc-launch__label { max-width: 0; opacity: 0; transition: max-width .35s ease, opacity .15s ease; }
#tcgc.is-compact .tcgc-launch:has(.tcgc-launch__face)::before { left: 41px; }
#tcgc.is-compact .tcgc-launch .tcgc-frame { inset: -6px; }
#tcgc.is-compact .tcgc-nudge { bottom: 64px; }
@media (max-width: 640px) {
  #tcgc.is-compact .tcgc-launch { padding: 0 9px 0 17px; }
  #tcgc.is-compact .tcgc-launch:has(.tcgc-launch__face)::before { left: 37px; }
}
@media (prefers-reduced-motion: reduce) {
  #tcgc .tcgc-launch { transform: none; }
}
