/* =========================================================
   DJ Echarry — AI Concierge panel
   ---------------------------------------------------------
   Deliberately a white/black/gold surface (per brief) rather
   than the site's usual dark chrome — a premium light "paper"
   floating over a dark blurred backdrop, echoing the DJ Echarry
   gold accent without reusing the dark .privacy-modal styling
   that the placeholder version borrowed. Uses the site's shared
   design tokens (--space-*, --color-gold*, --ease-out, --radius-*)
   throughout, and reuses .social-btn/.social-btn-concierge for
   every trigger (already defined further up this file) — no
   second trigger visual style exists anywhere.
   ========================================================= */
.concierge-backdrop {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  /* Lighter and warmer than the first pass (was rgba(11,10,9,0.55)) —
     that read as a heavy near-black scrim; this keeps the panel
     clearly the focus without the whole experience feeling dark. */
  background: rgba(24, 19, 13, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms var(--ease-out), visibility 0s linear 280ms;
}

.concierge-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 280ms var(--ease-out), visibility 0s linear 0s;
}

.concierge-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  /* Sizes to its own content (a short welcome menu no longer forces a
     tall, mostly-empty box) rather than a fixed height, capped so it
     can never touch the top/bottom edge — "never touch the viewport
     edge... use internal scrolling instead of extending beyond it". */
  height: auto;
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  color: #1a1a1a;
  border-radius: 26px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.55);
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 320ms var(--ease-out), opacity 320ms var(--ease-out);
  outline: none;
}

.concierge-backdrop.is-open .concierge-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .concierge-backdrop {
    /* A visible frame all the way around rather than true edge-to-
       edge — "not like an edge-to-edge dashboard" — while still
       reading as a near-full-screen sheet. */
    padding: var(--space-4);
    align-items: flex-end;
  }
  .concierge-panel {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - var(--space-6));
    border-radius: 24px;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%);
  }
  .concierge-backdrop.is-open .concierge-panel {
    transform: translateY(0);
  }
}

/* ---- Header ------------------------------------------------- */
.concierge-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  /* --space-6 (24px) on every side here matches the single inner
     content inset used by .concierge-progress/.concierge-back-row/
     .concierge-log below — one consistent grid, not four different
     ad-hoc values (was var(--space-5), a token that doesn't exist in
     this project's scale and silently collapsed to nothing). */
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
}

.concierge-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--color-gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.concierge-header-icon svg {
  width: 16px;
  height: 16px;
}

.concierge-header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}

.concierge-header-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}

.concierge-header-subtitle {
  font-size: 0.7rem;
  color: #8a8a8a;
  letter-spacing: 0.02em;
}

.concierge-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  position: relative;
  flex-shrink: 0;
}

.concierge-icon-btn {
  width: 40px;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #555;
  cursor: pointer;
  transition: background 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.concierge-icon-btn:hover,
.concierge-icon-btn:focus-visible {
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold-dark);
  border-color: rgba(212, 175, 55, 0.3);
}

.concierge-icon-btn svg {
  width: 16px;
  height: 16px;
}

.concierge-lang-toggle {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.concierge-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 44px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.22);
  padding: var(--space-2);
  min-width: 190px;
  z-index: 5;
}

.concierge-menu-item {
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
}

.concierge-menu-item:hover {
  background: rgba(212, 175, 55, 0.08);
}

/* ---- Progress + back row -------------------------------------- */
/* :not([hidden]) — same reasoning as .concierge-restart-confirm
   above: a bare display:flex would show an empty bar even while the
   hidden attribute is set (on every node outside the primary flow). */
.concierge-progress:not([hidden]) {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.045), rgba(255, 255, 255, 0));
  flex-shrink: 0;
  overflow-x: auto;
}

.concierge-progress-step {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #cfcfcf;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.concierge-progress-step.is-done {
  color: #a08a4a;
}

.concierge-progress-step.is-current {
  color: var(--color-gold-dark);
  border-bottom-color: var(--color-gold);
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.18);
}

.concierge-back-row {
  padding: var(--space-3) var(--space-6) 0;
  flex-shrink: 0;
}

.concierge-back-btn {
  background: none;
  border: none;
  color: #8a8a8a;
  font-size: 0.8rem;
  cursor: pointer;
  padding: var(--space-1) 0;
  min-height: 32px;
}

.concierge-back-btn:hover {
  color: var(--color-gold-dark);
}

/* ---- Log -------------------------------------------------------- */
.concierge-log {
  position: relative;
  flex: 1;
  overflow-y: auto;
  /* Extra bottom padding (--space-8, 32px) so the last button/field
     never sits flush against the panel's own rounded corner. */
  padding: 1.25rem var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
  background: radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.055), transparent 28%);
}

.concierge-answered {
  align-self: flex-end;
  max-width: 85%;
  background: linear-gradient(145deg, #fcf8ed, #f8f4e9);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px 16px 4px 16px;
  padding: var(--space-3) var(--space-4);
}

.concierge-answered-q {
  font-size: 0.68rem;
  color: #a8a8a8;
  margin: 0 0 2px;
}

.concierge-answered-a {
  font-size: 0.86rem;
  color: #1a1a1a;
  font-weight: 600;
  margin: 0;
}

.concierge-bubble-bot {
  align-self: flex-start;
  max-width: 94%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: 6px 18px 18px 18px;
  padding: var(--space-4);
  font-size: 0.92rem;
  line-height: 1.55;
  color: #222;
  box-shadow: 0 8px 24px rgba(24, 18, 8, 0.045);
  animation: concierge-fade-in 220ms var(--ease-out);
}

.concierge-bubble-bot p {
  margin: 0 0 var(--space-2);
}

.concierge-bubble-bot p:last-child {
  margin-bottom: 0;
}

@keyframes concierge-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.concierge-section-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 var(--space-2);
}

.concierge-service-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 var(--space-1);
}

.concierge-pending-notice {
  font-style: italic;
  color: #8a8a8a;
}

/* ---- Controls ----------------------------------------------------- */
.concierge-controls {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: concierge-fade-in 220ms var(--ease-out);
}

.concierge-hint {
  font-size: 0.78rem;
  color: #8a8a8a;
  margin: 0;
}

.concierge-quick-replies,
.concierge-multi-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.55rem;
}

.concierge-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: #1a1a1a;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), background 150ms var(--ease-out), color 150ms var(--ease-out),
    transform 100ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.concierge-btn:hover,
.concierge-btn:focus-visible {
  border-color: var(--color-gold);
  background: rgba(212, 175, 55, 0.06);
}

.concierge-btn:active {
  transform: scale(0.98);
}

.concierge-btn-primary {
  min-height: 50px;
  padding: 0.8rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8ca61 0%, #c59a2c 100%);
  border-color: rgba(139, 101, 13, 0.28);
  color: #171206;
  font-weight: 750;
  box-shadow: 0 7px 18px rgba(174, 127, 22, 0.18);
}

.concierge-btn-primary:hover,
.concierge-btn-primary:focus-visible {
  background: linear-gradient(135deg, #efd879 0%, #cda437 100%);
  border-color: rgba(139, 101, 13, 0.42);
  box-shadow: 0 9px 22px rgba(174, 127, 22, 0.25);
  transform: translateY(-1px);
}

.concierge-btn-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.concierge-chip {
  min-height: 40px;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: border-color 150ms var(--ease-out), background 150ms var(--ease-out), color 150ms var(--ease-out),
    box-shadow 150ms var(--ease-out), transform 100ms var(--ease-out);
}

.concierge-chip:hover {
  border-color: var(--color-gold);
}

.concierge-chip.is-selected {
  background: linear-gradient(135deg, #e7c653, #c69a25);
  border-color: #b48618;
  color: #171206;
  box-shadow: 0 4px 12px rgba(174, 127, 22, 0.2);
}

.concierge-chip.is-selected::before {
  content: "✓";
  font-size: 0.72rem;
  font-weight: 900;
}

.concierge-continue {
  align-self: stretch;
  width: 100%;
  margin-top: var(--space-1);
}

.concierge-note-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.concierge-field-label {
  font-size: 0.78rem;
  color: #666;
  font-weight: 600;
}

/* ---- Inputs ---------------------------------------------------------- */
.concierge-input,
.concierge-textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.015);
}

.concierge-input:focus,
.concierge-textarea:focus,
.concierge-input:focus-visible,
.concierge-textarea:focus-visible {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16);
}

.concierge-textarea {
  min-height: 84px;
  resize: vertical;
}

.concierge-textarea-small {
  min-height: 56px;
}

.concierge-input-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.concierge-input-row > .concierge-btn {
  flex: 1 1 145px;
}

.concierge-input-row > .concierge-btn:only-child {
  width: 100%;
  flex-basis: 100%;
}

.concierge-controls > .concierge-btn {
  width: 100%;
  min-height: 50px;
}

.concierge-controls > .concierge-btn:not(.concierge-btn-primary) {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(0, 0, 0, 0.13);
}

.concierge-controls > .concierge-btn:not(.concierge-btn-primary):hover,
.concierge-controls > .concierge-btn:not(.concierge-btn-primary):focus-visible {
  background: #fff;
  border-color: rgba(181, 136, 27, 0.58);
  box-shadow: 0 6px 16px rgba(31, 23, 8, 0.06);
}

.concierge-field-error {
  color: var(--color-error);
  font-size: 0.78rem;
  margin: 0;
}

/* ---- Service cards / checklist / steps --------------------------------- */
.concierge-service-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.concierge-service-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: var(--space-4);
  background: #fcfbf9;
}

.concierge-service-card-title {
  font-weight: 700;
  margin: 0 0 4px;
}

.concierge-service-card-desc {
  font-size: 0.82rem;
  color: #666;
  margin: 0 0 var(--space-3);
}

.concierge-service-card-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.concierge-checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.concierge-checklist li {
  font-size: 0.85rem;
  padding-left: 1.2em;
  position: relative;
}

.concierge-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-gold-dark);
}

.concierge-steps {
  padding-left: 1.2em;
  margin: var(--space-2) 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

/* ---- Summary ----------------------------------------------------------- */
.concierge-summary-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.25rem;
}

.concierge-summary-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.85rem;
}

.concierge-summary-label {
  color: #8a8a8a;
  font-weight: 600;
  padding-top: 2px;
}

.concierge-summary-value {
  color: #1a1a1a;
  line-height: 1.5;
  word-break: break-word;
}

.concierge-edit-link {
  min-height: 32px;
  min-width: auto;
  padding: 0.2rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--color-gold-dark);
  text-decoration: underline;
  white-space: nowrap;
}

.concierge-submit-btn {
  width: 100%;
  min-height: 52px;
}

/* ---- Submission states --------------------------------------------------- */
.concierge-submitting {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.concierge-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.25);
  border-top-color: var(--color-gold);
  animation: concierge-spin 800ms linear infinite;
  flex-shrink: 0;
}

@keyframes concierge-spin {
  to {
    transform: rotate(360deg);
  }
}

.concierge-success-title {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-gold-dark);
  margin: 0 0 4px;
}

.concierge-submit-error {
  color: var(--color-error);
}

/* ---- Contact options ------------------------------------------------------ */
.concierge-contact-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

/* ---- FAQ feedback row ------------------------------------------------------ */
.concierge-feedback-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: #8a8a8a;
}

.concierge-feedback-row .concierge-btn {
  min-height: 32px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
}

/* ---- Restart confirmation overlay ------------------------------------------ */
/* :not([hidden]) rather than a plain display:flex — a class selector
   alone has equal specificity to the UA stylesheet's
   [hidden]{display:none} and wins on source order, which would show
   this overlay (covering the entire panel) at all times regardless
   of the hidden attribute. Same fix as .form-submit-error earlier. */
.concierge-restart-confirm:not([hidden]) {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
  gap: var(--space-2);
  z-index: 6;
}

.concierge-restart-confirm-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}

.concierge-restart-confirm-body {
  color: #666;
  font-size: 0.88rem;
  margin: 0 0 var(--space-3);
}

/* Placed after every base rule it touches on purpose — an equal-
   specificity override declared *before* its own base rule loses the
   cascade even when its media query matches, which is exactly what
   silently defeated this same set of rules on the first pass. */
@media (max-width: 640px) {
  /* "Echarry Event Planner" is considerably longer than the old
     "AI Concierge" label — on a narrow phone, competing against three
     44px-minimum tap targets (lang/menu/close, non-negotiable per the
     accessibility requirement) plus the icon, it was wrapping to
     three cramped lines. Tighter padding/gaps claw back width, and a
     smaller title size keeps it to a clean two lines instead. */
  .concierge-header {
    padding: var(--space-4) var(--space-4) var(--space-3);
    gap: var(--space-2);
  }
  .concierge-header-icon {
    width: 30px;
    height: 30px;
  }
  .concierge-header-title {
    font-size: 0.88rem;
    line-height: 1.2;
  }
  .concierge-header-subtitle {
    font-size: 0.64rem;
  }
  .concierge-header-actions {
    gap: 0;
  }
  .concierge-progress,
  .concierge-back-row,
  .concierge-log {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
  .concierge-log {
    padding-top: var(--space-4);
    padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
  }
  .concierge-input-row > .concierge-btn {
    flex-basis: 100%;
    width: 100%;
  }
  .concierge-controls {
    gap: var(--space-4);
  }
  .concierge-quick-replies,
  .concierge-multi-select {
    gap: 0.6rem 0.5rem;
  }
  .concierge-btn {
    padding-inline: 1rem;
  }
  /* Slightly less room for the value column than on desktop, so the
     Edit link always keeps clear space instead of crowding the
     panel's own edge. */
  .concierge-summary-row {
    grid-template-columns: 0.9fr 1.3fr auto;
    gap: var(--space-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .concierge-backdrop,
  .concierge-panel,
  .concierge-bubble-bot,
  .concierge-controls,
  .concierge-spinner {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
