/* Concierge widget — matches the Farrington palette (ink/amber/paper, serif headings). */

#fd-concierge,
#fd-concierge * {
  box-sizing: border-box;
}

#fd-concierge-launcher {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1.5px solid var(--amber);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 0 0 var(--amber-glow);
  transition: box-shadow 0.3s ease, transform 0.15s ease;
}
#fd-concierge-launcher:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 8px var(--amber-glow);
  transform: translateY(-1px);
}
#fd-concierge-launcher img,
#fd-concierge-launcher .fd-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#fd-concierge-panel {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  width: min(440px, calc(100vw - 24px));
  height: min(680px, calc(100vh - 48px));
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--sans);
}

.fd-c-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink-2);
}
.fd-c-header .fd-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--amber); flex-shrink: 0; }
.fd-c-header .fd-avatar-fallback {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  flex-shrink: 0;
}
.fd-c-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.2px;
  margin: 0;
  line-height: 1.1;
}
.fd-c-title {
  font-size: 12px;
  color: var(--mute);
  margin-top: 2px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.fd-c-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--mute);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  font-family: var(--sans);
}
.fd-c-close:hover { color: var(--paper); }

.fd-c-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fd-bubble {
  max-width: 84%;
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.fd-bubble-user {
  align-self: flex-end;
  background: var(--amber);
  color: var(--ink);
  font-weight: 500;
}
.fd-bubble-agent {
  align-self: flex-start;
  background: var(--ink-3);
  color: var(--paper);
  border: 1px solid var(--line);
}
.fd-typing {
  align-self: flex-start;
  color: var(--mute);
  font-size: 13px;
  font-style: italic;
  padding: 6px 0;
}

.fd-quick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.fd-quick-btn {
  text-align: left;
  padding: 11px 15px;
  min-height: 44px;
  background: var(--ink-2);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.15s;
}
.fd-quick-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.fd-c-input-row {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 8px;
  background: var(--ink-2);
}
.fd-c-input {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--sans);
}
.fd-c-input:focus {
  outline: none;
  border-color: var(--amber);
}
.fd-c-input:disabled { opacity: 0.5; }

.fd-btn-primary {
  padding: 0 20px;
  min-height: 44px;
  background: var(--amber);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.fd-btn-primary:hover:not(:disabled) {
  background: #ffc36b;
}
.fd-btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
  background: var(--line-2);
  color: var(--mute);
}

.fd-btn-ghost {
  padding: 11px 12px;
  min-height: 44px;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.fd-btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.fd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 0 12px 12px;
  background: var(--ink-2);
}

.fd-form { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; overflow-y: auto; }
.fd-form-title { font-family: var(--serif); font-size: 24px; font-weight: 500; margin: 0; }
.fd-form-sub { font-size: 13px; color: var(--mute); margin: 0 0 4px; }
.fd-field-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 5px;
}
.fd-field-input {
  width: 100%;
  padding: 11px 14px;
  min-height: 44px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--sans);
}
.fd-field-input:focus { outline: none; border-color: var(--amber); }
.fd-field-textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.fd-form-error { color: var(--red); font-size: 13px; }
.fd-form-actions { display: flex; gap: 8px; margin-top: 4px; }

.fd-voice-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}
.fd-voice-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--amber);
}
.fd-voice-avatar.fd-pulse {
  animation: fd-pulse 1.6s infinite;
}
@keyframes fd-pulse {
  0%   { box-shadow: 0 0 0 0 var(--amber-glow); }
  70%  { box-shadow: 0 0 0 26px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.fd-voice-status {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}
.fd-voice-help {
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.04em;
  max-width: 260px;
}

.fd-sent-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.fd-sent-title { font-family: var(--serif); font-size: 26px; font-weight: 500; margin: 8px 0 0; }
.fd-sent-msg { color: var(--paper-dim); font-size: 14px; max-width: 300px; line-height: 1.55; }

@media (max-width: 480px) {
  #fd-concierge-panel {
    right: 8px; bottom: 8px; left: 8px;
    width: auto; height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
  #fd-concierge-launcher { right: 16px; bottom: 16px; width: 60px; height: 60px; }
}
