/* RSVP form-only styling
   Scoped to #formCard so the rest of the site keeps its current look.
*/

#formCard {
  max-width: 600px;
  margin-inline: auto;
  padding: 40px;
  background: linear-gradient(180deg, #F7DBB9 0%, #F2D3B1 100%);
  border: 20px solid #B0764B;
  border-radius: 22px;
  box-shadow:
    0 18px 40px rgba(151, 93, 46, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #000000;
  position: relative;
}

#formCard h2 {
  text-align: center;
  margin: 0 0 16px 0;
  color: #000000;
  font-size: 25px;
}

#formCard > p,
#editSection > p {
  text-align: center;
  font-size: 21px;
  margin: 10px 0 20px 0;
  color: #000000;
}

#formCard label {
  display: block;
  margin: 10px 0 6px 0;
  font-size: 19px;
  color: #000000;
}

#formCard input,
#formCard select,
#formCard textarea {
  width: 100%;
  padding: 10px;
  margin: 0 0 10px 0;
  font-size: 21px;
  font-family: inherit;
  border-radius: 14px;
  border: 2px solid rgba(176, 118, 75, 0.55);
  background: rgba(247, 219, 185, 0.55);
  box-sizing: border-box;
  color: #000000;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#formCard input::placeholder,
#formCard textarea::placeholder {
  color: rgba(0, 0, 0, 0.6);
}

#formCard input:focus,
#formCard select:focus,
#formCard textarea:focus {
  border-color: #CB8E61;
  box-shadow:
    0 0 0 4px rgba(203, 142, 97, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#formCard button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 21px;
  font-family: inherit;
  background: linear-gradient(180deg, #E5B08A 0%, #CB8E61 45%, #B0764B 100%);
  color: #000000;
  border: 2px solid rgba(151, 93, 46, 0.65);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  box-shadow:
    0 8px 16px rgba(151, 93, 46, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#formCard button:hover {
  filter: brightness(1.03) saturate(1.05);
  transform: translateY(-1px);
}

#formCard button:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

#formCard button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

#formCard .hidden {
  display: none;
}

#loginError {
  color: #B00020;
  text-align: center;
  margin: 12px 0 0 0;
  font-size: 19px;
  font-weight: 600;
  min-height: 1.35em;
}

#updateMessage {
  text-align: center;
  margin: 14px auto 0 auto;
  font-size: 19px;
  font-weight: 600;
  display: none;
}

#updateMessage:not(:empty) {
  display: block;
  background: rgba(46, 125, 50, 0.24);
  color: #000000;
  padding: 10px 16px;
  border-radius: 16px;
  max-width: 400px;
}

#members {
  margin-top: 10px;
}

#formCard .member {
  margin-bottom: 24px;
  padding: 18px;
  border: 2px solid rgba(176, 118, 75, 0.35);
  border-radius: 16px;
  background: rgba(255, 248, 239, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#formCard .member:last-child {
  margin-bottom: 18px;
}

#formCard .member h3 {
  margin: 0 0 12px 0;
  text-align: center;
  font-size: 22px;
  color: #000000;
}

#formCard .row {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}

#formCard .col {
  flex: 1;
}

#formCard .row .col > label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(176, 118, 75, 0.45);
  background: rgba(247, 219, 185, 0.45);
  cursor: pointer;
  box-sizing: border-box;
}

#formCard .row input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #B0764B;
  flex: 0 0 auto;
  box-shadow: none;
}

#formCard .row .col > label:has(input[type="radio"]:checked) {
  border-color: #B0764B;
  background: rgba(229, 176, 138, 0.45);
  box-shadow: 0 0 0 4px rgba(203, 142, 97, 0.18);
}

#formCard .loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(242, 211, 177, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  z-index: 10;
}

body.busy #formCard .loading-overlay {
  display: flex;
}

#formCard .spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(176, 118, 75, 0.25);
  border-top: 6px solid #CB8E61;
  border-radius: 50%;
  animation: rsvp-spin 0.8s linear infinite;
}

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

@media (max-width: 768px) {
  #formCard {
    padding: 25px;
  }

  #formCard .row {
    flex-direction: column;
    gap: 10px;
  }
}
