/* Hobson Center Leasing Concierge */

.hc-assistant {
  --hc-primary: #0f3d5e;
  --hc-accent: #c9a227;
  --hc-accent-hover: #b8911f;
  --hc-bg: #f4f7fb;
  --hc-surface: #ffffff;
  --hc-text: #0f172a;
  --hc-muted: #64748b;
  --hc-border: #e2e8f0;
  --hc-danger: #dc2626;
  --hc-shadow: 0 18px 50px rgba(15, 61, 94, 0.22);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: 10050;
}

.hc-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--hc-primary), #1a5a86);
  border-radius: 999px;
  padding: 14px 18px;
  box-shadow: var(--hc-shadow);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hc-fab:hover { transform: translateY(-1px) scale(1.02); }
.hc-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.hc-fab-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.hc-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(400px, calc(100vw - 28px));
  height: min(620px, calc(100dvh - 28px));
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: 18px;
  box-shadow: var(--hc-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hc-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.hc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--hc-primary), #164d73);
  color: #fff;
}

.hc-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hc-header-text strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.hc-status {
  font-size: 0.75rem;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.hc-close:hover { background: rgba(255,255,255,0.12); }

.hc-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(201,162,39,0.08), transparent 40%),
    var(--hc-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hc-bubble {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--hc-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hc-bubble a {
  color: #0b4f7a;
  font-weight: 600;
  text-decoration: underline;
}

.hc-bubble--system,
.hc-bubble--assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--hc-border);
  border-bottom-left-radius: 4px;
}

.hc-bubble--user {
  align-self: flex-end;
  background: var(--hc-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.hc-bubble--thinking {
  color: var(--hc-muted);
  font-style: italic;
  box-shadow: none;
  border-style: dashed;
}

.hc-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 10px;
  background: var(--hc-bg);
  border-top: 1px solid transparent;
}

.hc-chip {
  border: 1px solid var(--hc-border);
  background: #fff;
  color: var(--hc-primary);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hc-chip:hover {
  background: #eef6fc;
  border-color: #bfd3e6;
}

.hc-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hc-border);
  background: #fff;
}

.hc-mic,
.hc-send {
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.hc-mic {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: var(--hc-primary);
  border: 1px solid var(--hc-border);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hc-mic:hover { background: #e2e8f0; }

.hc-mic.is-recording {
  background: #fee2e2;
  color: var(--hc-danger);
  border-color: #fecaca;
  animation: hc-pulse 1.4s infinite;
}

.hc-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--hc-border);
  border-radius: 999px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* prevent iOS zoom */
  color: var(--hc-text);
  background: #fff;
}

.hc-input:focus {
  outline: none;
  border-color: #8fb4d4;
  box-shadow: 0 0 0 3px rgba(15, 61, 94, 0.12);
}

.hc-send {
  background: var(--hc-accent);
  color: #1a1403;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 0.9rem;
}

.hc-send:hover { background: var(--hc-accent-hover); }
.hc-send:disabled,
.hc-mic:disabled,
.hc-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hc-record-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #1f2937;
  color: #fff;
  font-size: 0.85rem;
}

.hc-record-bar[hidden] { display: none !important; }

.hc-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: hc-pulse 1s infinite;
}

.hc-record-stop {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: var(--hc-accent);
  color: #1a1403;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}

@keyframes hc-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 480px) {
  .hc-assistant {
    right: 10px;
    left: 10px;
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  .hc-fab { width: 100%; justify-content: center; }

  .hc-panel {
    width: 100%;
    height: min(78dvh, 640px);
    bottom: 64px;
  }

  .hc-fab-label { font-size: 0.92rem; }
}
