/* ==========================================================================
   GED Assistant — Architectural Commercial Chat Widget
   ========================================================================== */

.ged-ai-fab {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: calc(var(--z-fab) + 5);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.05rem;
  background: var(--bg-charcoal);
  color: var(--ink-light);
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  transition: transform var(--dur-fast) var(--ease-arch), background var(--dur-fast), color var(--dur-fast);
}

.ged-ai-fab:hover {
  background: var(--gold);
  color: var(--bg-obsidian);
  transform: translateY(-2px);
}

.ged-ai-fab__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.ged-ai-fab:hover .ged-ai-fab__dot {
  background: var(--bg-obsidian);
  box-shadow: none;
}

.ged-ai-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: var(--z-modal);
  width: min(400px, calc(100vw - 24px));
  height: min(580px, calc(100dvh - 44px));
  background: var(--bg-charcoal);
  border: 1px solid var(--line-dark-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ged-ai-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  background: var(--bg-obsidian);
  border-bottom: 1px solid var(--line-dark);
}

.ged-ai-panel__title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ged-ai-panel__title strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ink-light);
}

.ged-ai-panel__title small {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.ged-ai-close {
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line-dark-strong);
  color: var(--ink-light);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.ged-ai-close:hover {
  background: var(--gold);
  color: var(--bg-obsidian);
  border-color: var(--gold);
}

.ged-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ged-ai-msg {
  max-width: 88%;
  padding: 0.72rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ged-ai-msg--bot {
  align-self: flex-start;
  background: var(--bg-concrete-dark);
  border: 1px solid var(--line-dark);
  border-left: 2px solid var(--gold);
  color: var(--ink-light);
}

.ged-ai-msg--user {
  align-self: flex-end;
  background: var(--gold);
  color: var(--bg-obsidian);
  font-weight: 500;
}

.ged-ai-msg--typing {
  opacity: 0.72;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.ged-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.7rem;
}

.ged-ai-chip {
  padding: 0.38rem 0.68rem;
  background: var(--bg-obsidian);
  border: 1px solid var(--line-dark-strong);
  color: var(--ink-light-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

.ged-ai-chip:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
}

.ged-ai-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-obsidian);
  border-top: 1px solid var(--line-dark);
}

.ged-ai-form input {
  flex: 1;
  min-width: 0;
  padding: 0.62rem 0.8rem;
  background: var(--bg-charcoal);
  border: 1px solid var(--line-dark-strong);
  color: var(--ink-light);
  font-size: 0.88rem;
}

.ged-ai-form input:focus {
  border-color: var(--gold);
  outline: none;
}

.ged-ai-form button {
  padding: 0.62rem 0.95rem;
  background: var(--gold);
  color: var(--bg-obsidian);
  border: none;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.ged-ai-form button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.ged-ai-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.48rem 0.9rem;
  background: #090807;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-light-muted);
}

.ged-ai-foot a {
  color: var(--gold-hi);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 768px) {
  .ged-ai-fab {
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    padding: 0.62rem 0.88rem;
    font-size: 0.68rem;
  }

  .ged-ai-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: min(82dvh, 620px);
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
}
