/* RSVP page styles — extends global styles.css */

/* Shared layout styles (matching story.html patterns) */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-header {
  text-align: center;
  padding: 2rem 1rem;
  background-color: #002c16df;
  color: #f7f6f4;
}
.page-header h1 {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  margin: 0 0 0.25rem;
  color: inherit;
}
.page-subtitle {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  border-radius: 4px;
  transition: background 0.2s, opacity 0.2s;
}
.btn-primary {
  background-color: #002c16df;
  color: #f1efed;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}
.btn-primary:hover {
  opacity: 0.85;
}

.rsvp-section {
  padding: 1rem 0 2rem;
}

/* Shared step visibility */
.rsvp-step {
  display: none;
}
.rsvp-step--active {
  display: block;
}

/* ---- Lookup Step ---- */
.lookup-card {
  max-width: 480px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid #e8c4d4;
  border-radius: 8px;
  text-align: center;
  background: #faf5f0;
}
.lookup-heading {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: #002c16df;
  margin: 0 0 0.5rem;
}
.lookup-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  color: #002c16df;
  margin: 0 0 1.25rem;
}
.lookup-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.lookup-input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  border: 1px solid #e8c4d4;
  border-radius: 4px;
  background: #fff;
  color: #002c16df;
  outline: none;
  transition: border-color 0.2s;
}
.lookup-input:focus {
  border-color: #002c16df;
}
.lookup-btn {
  white-space: nowrap;
  padding: 0.6rem 1.5rem;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
}
.lookup-error {
  font-family: "Cormorant Garamond", serif;
  color: #b00020;
  font-size: 1rem;
  margin: 0.75rem 0 0;
  min-height: 1.5em;
}

/* ---- Party Step ---- */
.party-header {
  text-align: center;
  margin: 2rem 0 1.5rem;
}
.party-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  color: #450920;
  margin: 0;
}
.party-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Guest Card */
.guest-card {
  border: 1px solid #e8c4d4;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  background: #faf5f0;
}
.guest-card-name {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  color: #450920;
  margin: 0 0 0.75rem;
}

/* Pill toggle group */
.pill-group {
  display: flex;
  gap: 0;
  margin-bottom: 0.75rem;
}
.pill-group-label {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: #002c16df;
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.pill {
  flex: 1;
  padding: 0.5rem 1rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  border: 1px solid #e8c4d4;
  background: #fff;
  color: #002c16df;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
  user-select: none;
}
.pill:first-child {
  border-radius: 4px 0 0 4px;
}
.pill:last-child {
  border-radius: 0 4px 4px 0;
}
.pill:not(:last-child) {
  border-right: none;
}
.pill:hover {
  background: #f0ebe5;
}
.pill--selected {
  background: #002c16df;
  color: #fff;
  border-color: #002c16df;
}
.pill--error {
  border-color: #002c16df;
}

/* Conditional fields (meal + song) */
.guest-card-extra {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin 0.35s ease;
  margin-top: 0;
}
.guest-card-extra--visible {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.5rem;
}


/* Allergies input */
.allerg-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  border: 1px solid #e8c4d4;
  border-radius: 4px;
  background: #fff;
  color: #1d2c15;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.allerg-input:focus {
  border-color: #165033;
}
.allerg-input::placeholder {
  color: #b19fa6;
}

/* Song request input */
.song-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  border: 1px solid #e8c4d4;
  border-radius: 4px;
  background: #fff;
  color: #1d2c15;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.song-input:focus {
  border-color: #165033;
}
.song-input::placeholder {
  color: #b19fa6;
}

/* Party footer & submit */
.party-footer {
  text-align: center;
  margin: 1.5rem auto 2rem;
  max-width: 600px;
}
.party-error {
  font-family: "Cormorant Garamond", serif;
  color: #b00020;
  font-size: 1rem;
  margin: 0 0 0.75rem;
  min-height: 1.5em;
}
.submit-btn {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  padding: 0.7rem 2.5rem;
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Confirm Step ---- */
.confirm-card {
  max-width: 520px;
  margin: 3rem auto;
  padding: 2.5rem 2rem;
  border: 1px solid #e8c4d4;
  border-radius: 8px;
  text-align: center;
  background: #faf5f0;
}
.confirm-heading {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: #450920;
  margin: 0 0 1rem;
}
.confirm-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: #1d2c15;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

/* ---- Spinner ---- */
.spinner {
  display: none;
  width: 28px;
  height: 28px;
  border: 3px solid #e8c4d4;
  border-top-color: #165033;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 1rem auto;
}
.spinner--visible {
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .lookup-form {
    flex-direction: column;
  }
  .lookup-input {
    width: 100%;
    min-width: unset;
  }
  .lookup-btn {
    width: 100%;
  }
  .guest-card {
    padding: 1rem;
  }
  .pill {
    padding: 0.5rem 0.25rem;
    font-size: 0.95rem;
  }
}
