/* ---------------------------------------------------------------
   Conversational reservation wizard — only loaded by index.html.
   Everything is scoped under .alt-* so the standard form is untouched.
   --------------------------------------------------------------- */

.alt-form {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 470px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* The hidden attribute must win over any display rules below. */
.alt-form [hidden] {
  display: none !important;
}

.alt-progress {
  height: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(246, 239, 228, 0.1);
  overflow: hidden;
}

.alt-progress-fill {
  display: block;
  height: 100%;
  width: 14.2857%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.35s ease;
}

.alt-step-meta {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin-bottom: 28px;
  color: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.alt-steps {
  flex: 1;
}

.alt-step {
  display: none;
}

.alt-step.is-active {
  display: block;
  animation: alt-step-in 0.35s ease both;
}

@keyframes alt-step-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.alt-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.alt-question {
  max-width: 24ch;
  margin: 0 0 22px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.alt-subhint {
  margin: -12px 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.alt-input-wrap {
  margin-bottom: 16px;
}

.alt-field-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(246, 239, 228, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.alt-input-wrap:focus-within .alt-field-label {
  color: var(--accent-soft);
}

.alt-input-wrap input,
.alt-input-wrap textarea {
  display: block;
  width: 100%;
  padding: 10px 2px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  outline: none;
  color: var(--cream);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  transition: border-color 0.2s ease;
}

.alt-input-wrap textarea {
  min-height: 60px;
  line-height: 1.5;
  resize: vertical;
}

.alt-input-wrap input::placeholder,
.alt-input-wrap textarea::placeholder {
  color: rgba(246, 239, 228, 0.28);
}

.alt-input-wrap input:focus,
.alt-input-wrap textarea:focus {
  border-bottom-color: var(--accent);
}

.alt-input-wrap input.invalid,
.alt-input-wrap textarea.invalid {
  border-bottom-color: #e07b7b;
}

/* Browsers paint autofilled inputs with a pale UA background that ignores
   background-color. Cover it with a warm dark brown so it stays distinct. */
.alt-input-wrap input:-webkit-autofill,
.alt-input-wrap input:-webkit-autofill:hover,
.alt-input-wrap input:-webkit-autofill:focus,
.alt-input-wrap input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--cream);
  -webkit-box-shadow: 0 0 0 1000px #3a2a20 inset;
  box-shadow: 0 0 0 1000px #3a2a20 inset;
  caret-color: var(--cream);
  transition: background-color 9999s ease-out, border-color 0.2s ease;
}

.alt-input-wrap input:-webkit-autofill:focus,
.alt-input-wrap input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #453126 inset;
  box-shadow: 0 0 0 1000px #453126 inset;
}

/* Kept as a separate rule so unsupported browsers simply ignore it. */
.alt-input-wrap input:-internal-autofill-selected {
  -webkit-text-fill-color: var(--cream);
  -webkit-box-shadow: 0 0 0 1000px #3a2a20 inset;
  box-shadow: 0 0 0 1000px #3a2a20 inset;
  caret-color: var(--cream);
}

.alt-input-wrap input:-internal-autofill-selected:focus {
  -webkit-box-shadow: 0 0 0 1000px #453126 inset;
  box-shadow: 0 0 0 1000px #453126 inset;
}

.alt-input-wrap input[type="date"] {
  color-scheme: dark;
}

.alt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.alt-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.alt-choice {
  cursor: pointer;
}

.alt-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.alt-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease,
              color 0.2s ease, transform 0.15s ease;
}

.alt-choice:hover span {
  border-color: var(--accent-soft);
  transform: translateY(-1px);
}

.alt-choice input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.alt-choice input:focus-visible + span {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

.alt-error {
  min-height: 1.4em;
  margin: 6px 0 0;
  color: #f0a5a5;
  font-size: 0.85rem;
}

.alt-hint {
  margin: 14px 0 0;
  color: rgba(246, 239, 228, 0.4);
  font-size: 0.78rem;
}

.alt-review {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

.alt-review-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.alt-review dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alt-review dd {
  margin: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.alt-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  cursor: pointer;
}

.alt-consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.alt-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.alt-back,
.alt-next,
.alt-submit,
.alt-retry {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.alt-back {
  padding: 10px 4px;
  background: transparent;
  color: var(--muted);
}

.alt-back:hover {
  color: var(--cream);
}

.alt-next,
.alt-submit {
  margin-left: auto;
  padding: 13px 24px;
  background: var(--accent);
  color: var(--ink);
  font-size: 1rem;
}

.alt-next:hover,
.alt-submit:hover {
  background: var(--accent-soft);
}

.alt-form.is-loading .alt-submit {
  pointer-events: none;
  opacity: 0.8;
}

.alt-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(23, 19, 16, 0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: alt-spin 0.7s linear infinite;
}

.alt-form.is-loading .alt-spinner {
  display: inline-block;
}

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

.alt-panel {
  padding: 24px 0 8px;
  text-align: center;
  animation: alt-step-in 0.4s ease both;
}

.alt-panel h3 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.alt-panel p {
  color: var(--muted);
}

.alt-success-bunny {
  width: 76px;
  margin: 0 auto 18px;
  animation: alt-hop 0.8s ease 2;
}

@keyframes alt-hop {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-14px); }
  70%      { transform: translateY(0); }
}

.alt-failure h3 {
  color: #f0a5a5;
}

.alt-retry {
  margin: 10px auto 0;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-soft);
  font-size: 0.9rem;
}

.alt-retry:hover {
  background: rgba(188, 61, 24, 0.12);
}

@media (max-width: 640px) {
  .alt-form {
    min-height: 440px;
    padding: 22px 20px;
  }

  .alt-question {
    max-width: none;
    font-size: 1.5rem;
  }

  .alt-choices {
    gap: 8px;
  }

  .alt-choice span {
    min-width: 54px;
    padding: 9px 14px;
  }

  .alt-review-row {
    grid-template-columns: 90px 1fr;
  }

  .alt-next,
  .alt-submit {
    padding: 12px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alt-step.is-active,
  .alt-panel,
  .alt-success-bunny {
    animation: none;
  }

  .alt-progress-fill,
  .alt-choice span,
  .alt-field-label,
  .alt-input-wrap input,
  .alt-input-wrap textarea,
  .alt-back,
  .alt-next,
  .alt-submit,
  .alt-retry {
    transition: none;
  }
}
