/* ===========================================================================
   Lens launcher — persistent concierge entry point (bottom-right)
   Dark glass · soft orange/purple glow · restrained motion
   ======================================================================== */
.lens-launcher { position: fixed; right: 26px; bottom: 26px; z-index: 1200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }

/* dock row — teaser sits to the LEFT of the orb */
.lens-launcher-dock { display: flex; align-items: center; gap: 12px; }

/* ── orb button ── */
.lens-launcher-orb { position: relative; flex-shrink: 0; width: 62px; height: 62px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer; background: #0a0a0e; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 22px rgba(242,34,72, calc(0.34 * var(--glow-mult, 1))), 0 0 34px rgba(140,107,240, calc(0.20 * var(--glow-mult, 1)));
  transition: transform .25s var(--ease, ease), box-shadow .25s var(--ease, ease); }
.lens-launcher-orb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.lens-launcher-orb::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; padding: 2px; pointer-events: none;
  background: linear-gradient(140deg, #FF6477 0%, #DF1441 40%, #8C6BF0 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; opacity: 0.9; }
.lens-launcher-orb:hover { transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 34px rgba(0,0,0,0.55), 0 0 30px rgba(242,34,72, calc(0.52 * var(--glow-mult, 1))), 0 0 44px rgba(140,107,240, calc(0.3 * var(--glow-mult, 1))); }
.lens-launcher-orb:active { transform: scale(0.98); }
.lens-launcher-orb:focus-visible { outline: 2px solid rgba(242,34,72,0.6); outline-offset: 3px; }

/* notification badge */
.lens-launcher-badge { position: absolute; top: -2px; right: -2px; z-index: 2; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #FF4D4D; color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #0c0b10, 0 2px 8px rgba(255,77,77,0.5); animation: lens-launcher-pop .3s var(--ease, ease) both; }

/* ── teaser bubble ── */
.lens-launcher-teaser { display: flex; align-items: center; gap: 10px; padding: 11px 11px 11px 16px; border-radius: 14px; cursor: pointer;
  white-space: nowrap; background: linear-gradient(135deg, rgba(40,40,46,0.82), rgba(20,18,26,0.86));
  border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: lens-launcher-rise .45s var(--ease, ease) both; }
.lens-launcher-teaser-txt { font-family: var(--font-body); font-weight: 300; font-size: 14px; color: var(--fg1); }
.lens-launcher-teaser-x { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.06); color: var(--fg3); font-size: 16px; line-height: 1; display: inline-flex;
  align-items: center; justify-content: center; transition: background .15s, color .15s; }
.lens-launcher-teaser-x:hover { background: rgba(255,255,255,0.13); color: var(--fg1); }

/* ── compact chat preview panel (above the orb) ── */
.lens-launcher-panel { width: 348px; max-width: calc(100vw - 44px); border-radius: 20px; overflow: hidden;
  transform-origin: bottom right; animation: lens-launcher-panel-in .32s var(--ease, ease) both;
  background: linear-gradient(135deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.015) 100%), linear-gradient(180deg, rgba(16,14,20,0.93) 0%, rgba(11,10,15,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.13); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.18); }

.lens-launcher-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 18px 15px;
  border-bottom: 1px solid var(--border-subtle); }
.lens-launcher-av { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: #08080c;
  box-shadow: 0 0 14px rgba(242,34,72, calc(0.3 * var(--glow-mult, 1))), inset 0 0 0 1px rgba(255,255,255,0.07); }
.lens-launcher-av img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.lens-launcher-htext { min-width: 0; flex: 1 1 auto; }
.lens-launcher-htext h5 { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--fg1); margin: 0; }
.lens-launcher-status { display: flex; align-items: center; gap: 6px; font-family: var(--font-ui); font-weight: 400; font-size: 12px; color: var(--fg3); margin: 3px 0 0; }
.lens-launcher-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success, #2FD37A); box-shadow: 0 0 8px rgba(47,211,122,0.8); }
.lens-launcher-hbtn { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.05); color: var(--fg3); font-size: 16px; line-height: 1; display: inline-flex;
  align-items: center; justify-content: center; transition: background .15s, color .15s; }
.lens-launcher-hbtn:hover { background: rgba(255,255,255,0.11); color: var(--fg1); }

.lens-launcher-thread { max-height: 340px; overflow-y: auto; padding: 17px 18px 4px; display: flex; flex-direction: column; gap: 16px; }
.lens-launcher-thread .chat-bubble p, .lens-launcher-thread .chat-you-bubble { font-size: 14px; }
.lens-launcher-thread .chat-sender { font-size: 11px; margin-bottom: 6px; }
.lens-launcher-thread .chat-estimate-card { padding: 14px 16px; }

.lens-launcher-pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 4px; }
.lens-launcher-pill { font-family: var(--font-ui); font-weight: 500; font-size: 13px; padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-default); color: var(--fg1); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s; }
.lens-launcher-pill:hover { border-color: rgba(140,107,240,0.5); background: rgba(140,107,240,0.12); color: #fff; }

.lens-launcher-input { display: flex; align-items: center; gap: 8px; margin: 16px 16px 16px; padding: 7px 7px 7px 15px;
  border-radius: 999px; border: 1px solid var(--border-default); background: rgba(255,255,255,0.03); transition: border-color .15s, box-shadow .15s; }
.lens-launcher-input:focus-within { border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(140,107,240,0.18); }
.lens-launcher-input input { flex: 1 1 auto; min-width: 0; background: transparent; border: none; outline: none; color: var(--fg1);
  font-family: var(--font-body); font-size: 14px; }
.lens-launcher-input input::placeholder { color: var(--fg3); }
.lens-launcher-send { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; color: #3a0010;
  background: radial-gradient(circle at 34% 28%, #FFD7DD, #FF6477 40%, #DF1441 84%);
  box-shadow: 0 5px 14px -5px rgba(242,34,72, calc(0.5 * var(--glow-mult, 1))); transition: transform .15s; }
.lens-launcher-send:hover { transform: scale(1.06); }
.lens-launcher-send:disabled { opacity: 0.45; cursor: default; transform: none; }

/* ── motion ── */
@keyframes lens-launcher-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes lens-launcher-panel-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes lens-launcher-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .lens-launcher-teaser, .lens-launcher-panel, .lens-launcher-badge { animation: none; }
}

/* ── mobile ── */
@media (max-width: 560px) {
  .lens-launcher { right: 16px; bottom: 16px; gap: 12px; }
  .lens-launcher-orb { width: 56px; height: 56px; }
  .lens-launcher-teaser { max-width: 60vw; white-space: normal; }
  .lens-launcher-teaser-txt { font-size: 13px; }
  .lens-launcher-panel { width: calc(100vw - 32px); }
}

/* ===========================================================================
   Lens full-screen overlay — same session, expanded
   ======================================================================== */
.lens-fullscreen-overlay { position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 26px; }
.lens-fullscreen-backdrop { position: absolute; inset: 0; background: rgba(6,5,9,0.74);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: lens-fullscreen-fade .25s ease both; }
.lens-fullscreen-panel { position: relative; z-index: 1; width: min(880px, 100%); height: min(88vh, 940px);
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; transform-origin: bottom right;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.012) 100%), linear-gradient(180deg, rgba(16,14,20,0.96) 0%, rgba(11,10,15,0.97) 100%);
  border: 1px solid rgba(255,255,255,0.13); box-shadow: 0 40px 100px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.16);
  animation: lens-fullscreen-rise .3s var(--ease, ease) both; }

.lens-fullscreen-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px;
  border-bottom: 1px solid var(--border-subtle); background: rgba(255,255,255,0.015); }
.lens-fullscreen-head-text { flex: 1 1 auto; min-width: 0; }
.lens-fullscreen-head .chat-title { margin: 0; font-size: 22px; }
.lens-fullscreen-head .chat-subtitle { margin: 2px 0 0; }

.lens-fullscreen-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 30px 0; }
.lens-fullscreen-thread-inner { max-width: 720px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; gap: 22px; }
.lens-fullscreen-foot { border-top: 1px solid var(--border-subtle); padding: 6px 0 2px; }
.lens-fullscreen-foot .chat-input { max-width: 720px; margin: 14px auto; }

.lens-cards { display: grid; gap: 10px; margin-top: 12px; }
.lens-card { border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 12px;
  background: rgba(255,255,255,0.055); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.lens-card p { margin: 7px 0 0 !important; color: var(--fg2); font-size: 13px; line-height: 1.35; }
.lens-card-row { display: flex; justify-content: space-between; gap: 12px; align-items: center;
  color: var(--fg3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.lens-card-row b { color: var(--fg1); font-size: 12px; text-transform: none; letter-spacing: 0; }
.lens-card-bar { position: relative; height: 6px; overflow: hidden; margin-top: 10px; border-radius: 99px;
  background: rgba(255,255,255,0.09); }
.lens-card-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit;
  background: linear-gradient(90deg, #F22248, #8C6BF0); transition: width .35s var(--ease); }
.lens-options-msg { margin-top: -2px; }
.lens-options-msg .lens-av { visibility: hidden; }
.lens-options { display: flex; flex-wrap: wrap; gap: 8px; max-width: 76%; }
.lens-pill, .lens-action { border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; padding: 9px 12px;
  color: var(--fg1); background: rgba(255,255,255,0.065); font: inherit; font-size: 13px; cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.lens-pill:hover, .lens-action:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.lens-action--primary { border-color: rgba(242,34,72,0.45); background: linear-gradient(135deg, rgba(242,34,72,0.22), rgba(140,107,240,0.2)); }

/* ── Lens audit progress strip (full-screen header) ── */
.lens-progress { display: flex; align-items: flex-start; gap: 6px; padding: 14px 24px 16px;
  border-bottom: 1px solid var(--border-subtle); background: rgba(255,255,255,0.012); }
.lp-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center;
  gap: 8px; position: relative; text-align: center; }
.lp-step::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px;
  background: var(--border-default); z-index: 0; transition: background .3s var(--ease, ease); }
.lp-step:first-child::before { display: none; }
.lp-step.lp-done::before, .lp-step.lp-active::before { background: var(--success); }
.lp-node { position: relative; z-index: 1; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-ui);
  font-size: 12px; font-weight: 600; border: 1.5px solid var(--border-default);
  background: #0B1020; color: var(--fg3); transition: background .25s var(--ease, ease), border-color .25s var(--ease, ease), color .25s var(--ease, ease), box-shadow .25s var(--ease, ease); }
.lp-node i { font-size: 15px; }
.lp-done .lp-node { background: var(--success); border-color: var(--success); color: #04130d; }
.lp-active .lp-node { border-color: var(--magenta-500); color: var(--fg1); box-shadow: 0 0 0 3px rgba(242,34,72,0.18); }
.lp-active .lp-node::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%;
  border: 1.5px solid transparent; border-top-color: var(--magenta-400); animation: lp-spin .9s linear infinite; }
.lp-label { font-family: var(--font-ui); font-weight: 500; font-size: 11px; line-height: 1.3; color: var(--fg3); max-width: 116px; }
.lp-active .lp-label { color: var(--fg1); }
.lp-done .lp-label { color: var(--fg2); }
.lp-label em { display: block; font-style: normal; font-weight: 400; font-size: 10px; color: var(--fg3); margin-top: 3px; opacity: .85; word-break: break-word; }
@keyframes lp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lp-active .lp-node::after { animation: none; } }

/* waiting-for-site (pre-audit) state */
.lp-wait .lp-node { border-style: dashed; color: var(--fg3); }
.lp-wait .lp-label { color: var(--fg2); }

/* vertical variant — used in the in-page chat's left column */
.lens-progress--v { flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: none; border-bottom: 0; }
.lens-progress--v .lp-step { flex-direction: row; align-items: flex-start; gap: 14px; text-align: left; padding-bottom: 22px; }
.lens-progress--v .lp-step:last-child { padding-bottom: 0; }
.lens-progress--v .lp-step::before { top: 25px; bottom: -1px; left: 12px; right: auto; width: 2px; height: auto; }
.lens-progress--v .lp-step:first-child::before { display: block; }
.lens-progress--v .lp-step:last-child::before { display: none; }
.lens-progress--v .lp-step.lp-active::before { background: var(--border-default); }
.lens-progress--v .lp-step.lp-done::before { background: var(--success); }
.lens-progress--v .lp-label { max-width: none; font-size: 14px; line-height: 1.4; padding-top: 3px; color: var(--fg2); }
.lens-progress--v .lp-active .lp-label { color: var(--fg1); font-weight: 600; }
.lens-progress--v .lp-label em { font-size: 11.5px; }
.lens-progress--v .lp-node { width: 25px; height: 25px; }
@media (max-width: 640px) {
  .lens-progress { padding: 12px 14px; gap: 4px; }
  .lp-node { width: 24px; height: 24px; }
  .lp-label { font-size: 10px; max-width: 84px; }
  .lp-label em { font-size: 9px; }
}

@keyframes lens-fullscreen-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lens-fullscreen-rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lens-fullscreen-backdrop, .lens-fullscreen-panel { animation: none; } }

@media (max-width: 640px) {
  .lens-fullscreen-overlay { padding: 0; }
  .lens-fullscreen-panel { width: 100%; height: 100%; border-radius: 0; }
  .lens-fullscreen-head .chat-title { font-size: 19px; }
  .lens-fullscreen-thread-inner { padding: 0 18px; }
  .lens-fullscreen-foot .chat-input { margin: 12px 16px; }
}
