/* Generated by npm run build. Edit src/styles/components/assistant.css. */
/* Hallmark · project: Comp Master · scope: existing UI polish · 2026-11-13
   Critique: hierarchy and legibility before decorative surfaces; locked brand retained. */
/* Comp Master — Atelier Concierge. Scoped to avoid page/theme collisions. */
.cma-root.cma-signature {
  --cma-surface: var(--cm-comms-glass, rgba(17, 21, 30, 0.9));
  --cma-glass: var(--bg-glass);
  --cma-bubble: var(--surface-soft);
  --cma-field: var(--surface-sunken);
  --cma-line: var(--border-glass);
  --cma-ink: var(--text-primary);
  --cma-muted: var(--text-secondary);
  --cma-violet: var(--accent-bright);
  --cma-cyan: var(--accent-cyan);
  --cma-green: var(--success);
  --cma-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-body, var(--font-body));
  color: var(--cma-ink);
}
html[data-theme='light'] body .cma-root.cma-signature,
body[data-theme='light'] .cma-root.cma-signature {
  --cma-surface: var(--cm-comms-glass);
  --cma-glass: var(--bg-glass);
  --cma-bubble: var(--bg-surface);
  --cma-field: var(--surface-sunken);
  --cma-line: var(--border-glass);
  --cma-ink: var(--text-primary);
  --cma-muted: var(--text-secondary);
  --cma-violet: var(--accent);
  --cma-cyan: var(--accent-cyan);
  --cma-green: var(--success);
}
html[data-theme='light'] .cma-root.cma-signature .cma-panel {
  background: var(--bg-glass);
  border-color: var(--daylight-glass-edge);
  backdrop-filter: blur(var(--daylight-glass-blur));
  -webkit-backdrop-filter: blur(var(--daylight-glass-blur));
  box-shadow: var(--shadow-elevated);
}
html[data-theme='light'] .cma-root.cma-signature :is(.cma-msg--bot, .cma-msg--user, .cma-send) {
  box-shadow: var(--shadow-field);
}
html[data-theme='light'] .cma-root.cma-signature :is(.cma-msg--user, .cma-send) {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
html[data-theme='light'] .cma-root.cma-signature .cma-send {
  box-shadow: var(--shadow-primary);
  transition: var(--daylight-transition);
  transform: translateZ(0);
  backface-visibility: hidden;
}
html[data-theme='light'] .cma-root.cma-signature .cma-send:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: var(--shadow-primary-hover);
  transform: translate3d(0, var(--daylight-lift), 0);
}
html[data-theme='light'] .cma-root.cma-signature :is(.cma-chip, .cma-icon-btn, .cma-launcher) {
  border-color: var(--daylight-secondary-edge);
  transition: var(--daylight-transition);
}
html[data-theme='light'] .cma-root.cma-signature :is(.cma-chip, .cma-icon-btn, .cma-launcher):hover {
  background: var(--daylight-secondary-hover);
}
body.has-cma .toast-notification {
  bottom: 24px;
}
.cma-root.cma-signature button,
.cma-root.cma-signature input {
  font-family: inherit;
}

/* Discreet invitation to a personal consultation. */
.cma-root.cma-signature .cma-launcher {
  position: static;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: auto;
  width: auto;
  height: 44px;
  display: flex;
  place-items: center;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 23px;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 0.35s var(--cma-ease),
    opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;

  min-height: 44px;
  gap: 10px;
  padding: 10px 16px;
  transform: none;
}
.cma-root.cma-signature .cma-launcher:hover {
  transform: none;
  box-shadow: none;
}
.cma-root.cma-signature .cma-icon-close {
  display: none;
}
.cma-root.cma-signature .cma-icon-close {
  font:
    30px/1 system-ui,
    sans-serif;
}
.cma-root.cma-signature .cma-icon-btn > span {
  font:
    23px/1 system-ui,
    sans-serif;
}
.cma-root.cma-signature .cma-send > span {
  font:
    23px/1 system-ui,
    sans-serif;
}
.cma-root.cma-signature.is-open .cma-icon-open {
  display: none;
}
.cma-root.cma-signature.is-open .cma-icon-close {
  display: block;
}
.cma-root.cma-signature .cma-launcher__badge {
  position: static;
  right: -4px;
  top: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #11151e;
  border-radius: 20px;
  background: #b69aff;
  color: #201237;
  font-size: 14px;
  font-weight: 800;
  transform: scale(0);
  transition: transform 0.3s var(--cma-ease);
}
.cma-root.cma-signature .cma-launcher__badge.is-visible {
  transform: scale(1);
}
body.modal-open .cma-launcher,
body.cm-nav-open .cma-launcher {
  opacity: 0;
  pointer-events: none;
}

/* Messenger shell and frosted chrome. */
.cma-root.cma-signature .cma-panel {
  position: fixed;
  right: 24px;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 1450;
  width: min(420px, calc(100vw - 32px));
  height: min(690px, calc(100dvh - 132px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cma-line);
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(117, 75, 194, 0.14), transparent 45%), var(--cma-surface);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgba(232, 240, 255, 0.13),
    0 32px 90px -24px rgba(0, 0, 0, 0.72),
    0 0 42px -28px rgba(116, 82, 212, 0.65);
  overflow: hidden;
  transform-origin: bottom right;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.4s var(--cma-ease),
    opacity 0.25s ease,
    visibility 0s 0.4s;
}
.cma-root.cma-signature.is-open .cma-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    transform 0.4s var(--cma-ease),
    opacity 0.25s ease,
    visibility 0s;
}
.cma-root.cma-signature .cma-panel::before {
  content: '';
  position: absolute;
  inset: 0 24px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cma-violet), var(--cma-cyan), transparent);
  pointer-events: none;
  z-index: 1;
}
.cma-root.cma-signature .cma-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 19px 14px 18px 19px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--cma-line);
  background: var(--cma-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.cma-root.cma-signature .cma-avatar {
  width: 44px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(180, 146, 255, 0.36);
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(165, 121, 255, 0.21), rgba(103, 223, 239, 0.05));
  color: var(--cma-violet);
  font-family: var(--font-display, var(--font-display));
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.06em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.cma-root.cma-signature .cma-header__text {
  flex: 1;
  min-width: 0;
}
.cma-root.cma-signature .cma-header__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--cma-cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.6;
}
.cma-root.cma-signature .cma-header__title {
  margin: 0;
  color: var(--cma-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.cma-root.cma-signature .cma-header__sub {
  margin: 4px 0 0;
  color: var(--cma-muted);
  font-size: 14px;
  line-height: 1.4;
}
.cma-root.cma-signature .cma-icon-btn {
  width: 32px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--cma-muted);
  cursor: pointer;
  font-size: 14px;
  transition: none;
}
.cma-root.cma-signature .cma-icon-btn:hover {
  color: var(--cma-ink);
  background: var(--cma-field);
}
.cma-root.cma-signature .cma-journey {
  display: flex;
  justify-content: space-between;
  padding: 11px 19px 9px;
  color: var(--cma-muted);
  font-size: 14px;
  flex-shrink: 0;
}
.cma-root.cma-signature .cma-journey__step {
  font-size: 14px;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}
.cma-root.cma-signature .cma-progress {
  height: 2px;
  background: var(--cma-line);
  flex-shrink: 0;
}
.cma-root.cma-signature .cma-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #8153de, #73dce9);
  transition: transform 0.5s var(--cma-ease);
}

/* Conversation. */
.cma-root.cma-signature .cma-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 19px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cma-root.cma-signature .cma-msg {
  flex-shrink: 0;
  max-width: 88%;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 17px;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-line;
  animation: cmaBubbleIn 0.35s var(--cma-ease) both;
}
.cma-root.cma-signature .cma-msg--bot {
  align-self: flex-start;
  border-color: var(--cma-line);
  border-bottom-left-radius: 5px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.025), transparent), var(--cma-bubble);
  color: var(--cma-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 5px 16px -10px rgba(0, 0, 0, 0.28);
}
.cma-root.cma-signature .cma-msg--bot strong {
  color: var(--cma-cyan);
  font-weight: 700;
}
.cma-root.cma-signature .cma-msg--user {
  align-self: flex-end;
  border-color: rgba(197, 174, 255, 0.28);
  border-inline-end: 2px solid var(--cma-cyan);
  border-bottom-right-radius: 5px;
  color: #fff;
  background: linear-gradient(120deg, #6742b4, #7950ce 64%, #5069b6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 8px 20px -13px #8054df;
}
.cma-root.cma-signature .cma-msg--bot + .cma-msg--user,
.cma-root.cma-signature .cma-msg--user + .cma-msg--bot {
  margin-top: 5px;
}
.cma-root.cma-signature .cma-msg--bot::before {
  content: 'COMP MASTER';
  display: block;
  margin-bottom: 5px;
  color: var(--cma-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.cma-root.cma-signature .cma-msg--error {
  border-color: rgba(238, 123, 150, 0.5);
  background: rgba(172, 52, 82, 0.1);
}
@keyframes cmaBubbleIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.cma-root.cma-signature .cma-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding: 14px 16px;
  border: 1px solid var(--cma-line);
  border-radius: 15px 15px 15px 5px;
  background: var(--cma-bubble);
}
.cma-root.cma-signature .cma-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cma-violet);
  animation: cmaDot 1.2s ease-in-out infinite;
}
.cma-root.cma-signature .cma-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.cma-root.cma-signature .cma-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes cmaDot {
  0%,
  60%,
  100% {
    opacity: 0.4;
    transform: none;
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* Curated systems, compact enough for the conversation. */
.cma-root.cma-signature .cma-recs {
  display: grid;
  gap: 9px;
  flex-shrink: 0;
  margin: 3px 0;
  animation: cmaBubbleIn 0.35s ease both;
}
.cma-root.cma-signature .cma-rec {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 11px;
  padding: 12px;
  border: 1px solid var(--cma-line);
  border-radius: 16px;
  background: var(--cma-bubble);
  color: var(--cma-ink);
  text-decoration: none;
  transition: transform 0.25s ease;
}
.cma-root.cma-signature .cma-rec:hover {
  border-color: var(--cma-violet);
  transform: translateY(-2px);
}
.cma-root.cma-signature .cma-rec img {
  width: 52px;
  height: 63px;
  grid-row: span 2;
  align-self: center;
  object-fit: contain;
}
.cma-root.cma-signature .cma-rec__name {
  margin: 0;
  color: var(--cma-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.cma-root.cma-signature .cma-rec__spec {
  margin: 4px 0 0;
  color: var(--cma-muted);
  font-size: 14px;
  line-height: 1.5;
}
.cma-root.cma-signature .cma-rec__price {
  grid-column: 2;
  color: var(--cma-violet);
  font-size: 14px;
  font-weight: 700;
}

.cma-root.cma-signature .cma-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  flex-shrink: 0;
  padding: 0 16px 13px;
}
.cma-root.cma-signature .cma-chips:empty {
  display: none;
}
.cma-root.cma-signature .cma-chip {
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--cma-line);
  border-radius: 11px;
  background: var(--cma-field);
  color: var(--cma-ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.cma-root.cma-signature .cma-chip:hover {
  color: var(--cma-ink);
  border-color: var(--cma-violet);
  background: rgba(141, 98, 226, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 14px -8px var(--cma-violet);
  transform: translateY(-1px);
}

/* Frosted composer. */
.cma-root.cma-signature .cma-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  flex-shrink: 0;
  border-top: 1px solid var(--cma-line);
  background: var(--cma-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.cma-root.cma-signature .cma-input {
  flex: 1;
  min-width: 0;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--cma-line);
  border-radius: 13px;
  background: var(--cma-field);
  color: var(--cma-ink);
  font-size: 16px;
  transition: none;
}
.cma-root.cma-signature .cma-input::placeholder {
  color: var(--text-muted);
  opacity: 1;
  font-size: 14px;
}
.cma-root.cma-signature .cma-input:focus {
  outline: none;
  border-color: var(--cma-violet);
  background: var(--cma-field);
  box-shadow: 0 0 0 3px rgba(160, 117, 255, 0.12);
}
.cma-root.cma-signature .cma-input[aria-invalid='true'] {
  border-color: #d16d86;
}
.cma-root.cma-signature .cma-send {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  border: 1px solid rgba(192, 162, 255, 0.3);
  border-radius: 14px;
  background: linear-gradient(145deg, #7950d8, #5935b4);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 6px 16px -10px #7545d7;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.cma-root.cma-signature .cma-send:hover:not(:disabled) {
  transform: translateY(-2px);
}
.cma-root.cma-signature .cma-send:disabled {
  opacity: 0.45;
  cursor: default;
}
.cma-root.cma-signature .cma-input:disabled {
  opacity: 0.72;
}
.cma-root.cma-signature .cma-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.cma-root.cma-signature .cma-footnote {
  margin: 0;
  padding: 0 18px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--cma-glass);
  color: var(--cma-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  flex-shrink: 0;
}

/* Confirmed handoff: displayed only after POST /api/leads succeeds. */
.cma-root.cma-signature .cma-handoff {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(74, 198, 156, 0.32);
  border-radius: 18px;
  background: radial-gradient(ellipse at 0 0, rgba(76, 202, 157, 0.1), transparent 70%), var(--cma-bubble);
  flex-shrink: 0;
  animation: cmaBubbleIn 0.4s ease both;
}
.cma-root.cma-signature .cma-handoff__badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border: 1px solid rgba(74, 198, 156, 0.4);
  border-radius: 11px;
  color: var(--cma-green);
  background: rgba(74, 198, 156, 0.09);
  font-weight: 700;
}
.cma-root.cma-signature .cma-handoff__title {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--cma-ink);
}
.cma-root.cma-signature .cma-handoff__copy {
  margin: 0 0 14px;
  color: var(--cma-muted);
  font-size: 14px;
  line-height: 1.6;
}
.cma-root.cma-signature .cma-handoff__eta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cma-green);
  font-size: 14px;
  font-weight: 600;
}
.cma-root.cma-signature .cma-handoff__eta::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cma-green);
  box-shadow: 0 0 0 4px rgba(74, 198, 156, 0.09);
  animation: cmaStatus 2s ease infinite;
}
@keyframes cmaStatus {
  50% {
    transform: scale(1.3);
    opacity: 0.65;
  }
}
.cma-root.cma-signature .cma-handoff__elapsed {
  display: block;
  margin-top: 9px;
  color: var(--cma-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.cma-root.cma-signature .cma-handoff__note {
  margin: 10px 0 0;
  color: var(--cma-muted);
  font-size: 14px;
  line-height: 1.5;
}
.cma-root.cma-signature .cma-handoff__direct {
  display: inline-block;
  margin-top: 12px;
  color: var(--cma-cyan);
  font-size: 14px;
  text-underline-offset: 3px;
}
.cma-root.cma-signature .cma-handoff__direct[hidden] {
  display: none;
}
.cma-root.cma-signature .is-delayed .cma-handoff__eta::before {
  animation: none;
}
.cma-root.cma-signature :is(button, a):focus-visible {
  outline: 2px solid var(--cma-cyan);
  outline-offset: 3px;
}

/* Keep the messenger readable on short windows and phones. */
@media (max-width: 768px) {
  .cma-root.cma-signature .cma-launcher {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: 44px;
    border-radius: var(--radius-sm);
    position: static;
    min-height: 44px;
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: none;
    border: 1px solid var(--border-glass);
    z-index: auto;
    transform: none;
  }
  .cma-root.cma-signature .cma-panel {
    right: 16px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    height: min(690px, calc(100dvh - 110px));
  }
  body.has-cma .toast-notification {
    right: 16px;
    left: 16px;
    bottom: 92px;
  }
}
@media (max-width: 430px), (max-height: 480px) {
  .cma-root.cma-signature .cma-panel {
    inset: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
    transform: translateY(20px);
    transform-origin: bottom;
  }
  .cma-root.cma-signature.is-open .cma-launcher {
    opacity: 0;
    pointer-events: none;
  }
  .cma-root.cma-signature .cma-header {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }
  body.cma-locked {
    overflow: hidden;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cma-root.cma-signature *,
  .cma-root.cma-signature *::before {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.cma-root.cma-signature .cma-launcher-label {
  font: 500 14px/1.5 var(--font-body);
}
.cma-root.cma-signature .cma-panel {
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1600;
}
@media (max-width: 430px), (max-height: 560px) and (max-width: 900px) {
  .cma-root.cma-signature .cma-panel {
    inset: 0;
  }
}
