/* Soft Screening Room — BlingAI chat (Ask) */

.booth-fab {
  position: fixed;
  z-index: 110;
  right: clamp(1rem, 2.4vw, 1.75rem);
  bottom: clamp(5.4rem, 10vh, 6.4rem);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.05rem 0.7rem 0.78rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--amb, #100d0b) 78%, #1a1512);
  color: var(--paper, #f4efe6);
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    0 0 0 1px color-mix(in srgb, var(--paper, #f4efe6) 10%, transparent),
    0 0 24px color-mix(in srgb, var(--gel, #c4a484) 14%, transparent);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease,
    opacity 0.35s ease,
    background 0.4s ease;
  opacity: 0.94;
}
.booth-fab:hover,
.booth-fab:focus-visible {
  outline: none;
  opacity: 1;
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--amb, #100d0b) 70%, #221c18);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--gel, #c4a484) 28%, transparent),
    0 0 32px color-mix(in srgb, var(--gel, #c4a484) 22%, transparent);
}
.booth-fab__icon {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gel, #c4a484) 18%, transparent);
  color: var(--tungsten, #e8b87a);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--paper, #f4efe6) 10%, transparent);
}
.booth-fab__icon svg {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}
.booth-fab__label { position: relative; top: 1px; }
html.is-modal-open .booth-fab,
html.is-booth-open .booth-fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

/* Quiet tungsten panel — Soft Screening Room, no gimmick chrome */
.booth {
  position: fixed;
  z-index: 120;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.85rem, 2.5vh, 1.5rem);
  width: min(24.5rem, calc(100vw - 1.5rem));
  max-height: min(88vh, 820px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 22px, 0) scale(0.96);
  transform-origin: 92% 96%;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.55s,
    filter 0.55s ease;
  filter: blur(8px);
  border-radius: 1.05rem;
  color: var(--paper, #f4efe6);
  isolation: isolate;
}
.booth.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}
.booth__gel {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 82% 0%, color-mix(in srgb, var(--rim, #e8b87a) 18%, transparent), transparent 68%),
    radial-gradient(ellipse 75% 55% at 12% 100%, color-mix(in srgb, var(--gel, #c4a484) 14%, transparent), transparent 70%);
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s,
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}
.booth.is-open .booth__gel {
  opacity: 1;
  transform: scale(1);
}
.booth__frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  max-height: min(88vh, 820px);
  background: color-mix(in srgb, var(--amb, #100d0b) 92%, #000);
  border: 1px solid color-mix(in srgb, var(--paper, #f4efe6) 9%, transparent);
  border-radius: 1.05rem;
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.5),
    0 0 40px color-mix(in srgb, var(--gel, #c4a484) 10%, transparent);
  overflow: hidden;
  opacity: 0.92;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
    transform 0.58s cubic-bezier(0.16, 1, 0.3, 1) 0.04s;
}
.booth.is-open .booth__frame {
  opacity: 1;
  transform: none;
}

.booth__head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.15rem 0.75rem;
}
.booth__slate {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}
.booth__brand {
  margin: 0;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tungsten, #e8b87a) 75%, var(--paper, #f4efe6));
}
.booth__title {
  margin: 0;
  font-family: var(--serif, "Fraunces", Georgia, serif);
  font-weight: 300;
  font-size: clamp(1.45rem, 3.2vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.booth__sub {
  margin: 0;
  font-family: var(--serif-soft, "Cormorant Garamond", Georgia, serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--paper-dim, rgba(244, 239, 230, 0.7));
}
.booth__close {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--paper, #f4efe6) 14%, transparent);
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 1rem;
  line-height: 1;
  color: var(--paper-dim, rgba(244, 239, 230, 0.7));
  background: transparent;
  display: grid;
  place-items: center;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.booth__close:hover,
.booth__close:focus-visible {
  color: #fff;
  border-color: color-mix(in srgb, var(--gel, #c4a484) 45%, transparent);
  background: color-mix(in srgb, var(--gel, #c4a484) 10%, transparent);
  outline: none;
}

.booth__messages {
  position: relative;
  z-index: 3;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 1.15rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  min-height: 16rem;
}
.booth__messages::-webkit-scrollbar { width: 4px; }
.booth__messages::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--gel, #c4a484) 40%, transparent);
  border-radius: 4px;
}

.booth-msg {
  max-width: 92%;
  opacity: 0;
  transform: translateY(8px);
  animation: booth-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.booth-msg--bot {
  align-self: flex-start;
  font-family: var(--serif-soft, "Cormorant Garamond", Georgia, serif);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.45;
  color: color-mix(in srgb, var(--paper, #f4efe6) 92%, #fff);
}
.booth-msg--user {
  align-self: flex-end;
  padding: 0.55rem 0.8rem;
  border-radius: 0.85rem 0.85rem 0.2rem 0.85rem;
  background: color-mix(in srgb, var(--gel, #c4a484) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper, #f4efe6) 8%, transparent);
  font-family: var(--sans, "Outfit", system-ui, sans-serif);
  font-size: 0.9rem;
  line-height: 1.4;
  font-style: normal;
}
.booth-msg strong { font-weight: 600; font-style: normal; color: #fff; }
.booth-msg a {
  color: var(--tungsten, #e8b87a);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.booth-msg ul {
  margin: 0.35rem 0 0;
  padding-left: 1.05rem;
}
.booth-msg li { margin: 0.12rem 0; }

.booth-msg--thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-style: italic;
  color: var(--paper-dim, rgba(244, 239, 230, 0.7));
}
.booth-msg__dots {
  display: inline-flex;
  gap: 4px;
}
.booth-msg__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tungsten, #e8b87a);
  animation: booth-dot 1.2s ease-in-out infinite;
}
.booth-msg__dots i:nth-child(2) { animation-delay: 0.15s; }
.booth-msg__dots i:nth-child(3) { animation-delay: 0.3s; }

.booth-action {
  align-self: flex-start;
  margin-top: 0.1rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 0;
  background: color-mix(in srgb, var(--tungsten, #e8b87a) 88%, #fff);
  color: #1a120c;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s;
}
.booth-action:hover { transform: translateY(-1px); filter: brightness(1.04); }

@keyframes booth-rise {
  to { opacity: 1; transform: none; }
}
@keyframes booth-dot {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.booth__suggest {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 0.4rem;
  padding: 0 1rem 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.booth__suggest::-webkit-scrollbar { display: none; }
.booth__chip {
  flex: 0 0 auto;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--paper, #f4efe6) 14%, transparent);
  background: transparent;
  color: var(--paper-dim, rgba(244, 239, 230, 0.75));
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.booth__chip:hover {
  color: #fff;
  border-color: color-mix(in srgb, var(--gel, #c4a484) 45%, transparent);
  background: color-mix(in srgb, var(--gel, #c4a484) 10%, transparent);
}

.booth__compose {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: end;
  padding: 0.45rem 1rem 0.55rem;
}
.booth__compose::before {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gel, #c4a484) 35%, transparent), transparent);
  opacity: 0.5;
}
.booth__field {
  display: grid;
  gap: 0.2rem;
}
.booth__field label {
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper, #f4efe6) 42%, transparent);
}
.booth__field textarea {
  width: 100%;
  min-height: 2.4rem;
  max-height: 6rem;
  resize: none;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper, #f4efe6) 16%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--paper, #f4efe6);
  font-family: var(--serif-soft, "Cormorant Garamond", Georgia, serif);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.35;
  outline: none;
  transition: border-color 0.3s;
}
.booth__field textarea:focus {
  border-bottom-color: color-mix(in srgb, var(--gel, #c4a484) 65%, transparent);
}
.booth__field textarea::placeholder {
  color: color-mix(in srgb, var(--paper, #f4efe6) 32%, transparent);
}
.booth__send {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  border: 0;
  background: color-mix(in srgb, var(--tungsten, #e8b87a) 90%, #fff);
  color: #1a120c;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s;
}
.booth__send:hover { transform: scale(1.04); filter: brightness(1.05); }
.booth__send:disabled { opacity: 0.45; cursor: default; transform: none; }
.booth__send svg { width: 14px; height: 14px; }

.booth__credit {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 0 1.15rem 0.85rem;
  font-family: var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper, #f4efe6) 34%, transparent);
}
.booth__credit a { color: color-mix(in srgb, var(--copper, #c4a484) 85%, #fff); }

html.is-booth-open .tray {
  opacity: 0.35;
  pointer-events: none;
}

@media (max-width: 980px) {
  .booth-fab {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    padding: 0.65rem 0.9rem 0.65rem 0.72rem;
  }
  .booth {
    max-height: min(92vh, 900px);
  }
  .booth__frame {
    max-height: min(92vh, 900px);
  }
}
@media (max-width: 640px) {
  .booth-fab {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    padding: 0 0.95rem 0 0.72rem;
    min-height: 2.7rem;
    height: 2.7rem;
    box-sizing: border-box;
  }
  .booth {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 0.5rem;
    max-height: min(94vh, 920px);
    height: min(86vh, 820px);
    transform-origin: 50% 100%;
  }
  .booth__frame {
    max-height: min(94vh, 920px);
    height: 100%;
  }
  .booth__messages {
    min-height: 16rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .booth-msg__dots i { animation: none; }
  .booth,
  .booth-fab,
  .booth-msg { transition: none; animation: none; opacity: 1; transform: none; }
}


@media (min-width: 900px) {
  .booth {
    width: min(30rem, calc(100vw - 2rem));
    max-height: min(92vh, 940px);
    height: min(78vh, 820px);
  }
  .booth__frame {
    max-height: min(92vh, 940px);
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }
  .booth__messages { min-height: 28rem; }
}
