/* ===== RSVP SECTION ===== */

.rsvp {
  background-color: var(--color-blush);
}

.rsvp-form {
  max-width: 600px;
  margin: 0 auto;
}

/* Form group */
.form-group {
  margin-bottom: var(--space-xl);
}

.form-group__label {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  letter-spacing: var(--letter-spacing-wide);
}

.form-group__input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--color-gray-light);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background: var(--color-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input::placeholder {
  color: var(--color-gray);
}

.form-group__input:focus {
  outline: none;
  border-color: var(--color-rose-gold);
  box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.15);
}

.form-group__input.is-error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(214, 64, 69, 0.1);
}

.form-group__input.is-valid {
  border-color: var(--color-success);
}

.form-group__textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Error message */
.form-group__error {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-xs);
  min-height: 1.2em;
}

/* Radio options */
.form-group--radio {
  margin-bottom: var(--space-xl);
}

.form-group__radio-options {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-sm);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--color-charcoal);
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option__custom {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-gray-light);
  position: relative;
  transition: border-color 0.3s ease;
  flex-shrink: 0;
}

.radio-option__custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-rose-gold);
  transition: transform 0.3s ease;
}

.radio-option input[type="radio"]:checked ~ .radio-option__custom {
  border-color: var(--color-rose-gold);
}

.radio-option input[type="radio"]:checked ~ .radio-option__custom::after {
  transform: translate(-50%, -50%) scale(1);
}

.radio-option input[type="radio"]:focus-visible ~ .radio-option__custom {
  box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.15);
}

/* Guest side selector */
.guest-side {
  border: none;
  padding: 0;
  margin-bottom: var(--space-2xl);
}

.guest-side__options {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-lg);
}

.guest-side__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.guest-side__option:hover {
  transform: translateY(-4px);
}

.guest-side__option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.guest-side__circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--color-gray-light);
  overflow: hidden;
  background: var(--color-gray-light);
  transition: width 0.4s ease, height 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-side__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.guest-side__option input[type="radio"]:checked ~ .guest-side__circle {
  width: 240px;
  height: 240px;
  border: 4px solid var(--color-rose-gold);
  box-shadow: none;
}

.guest-side__option input[type="radio"]:focus-visible ~ .guest-side__circle {
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.3);
}

.guest-side__label {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  font-weight: 500;
  margin-top: var(--space-md);
  transition: color 0.3s ease;
}

.guest-side__option input[type="radio"]:checked ~ .guest-side__label {
  color: var(--color-rose-gold);
}

.guest-side__name {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-top: var(--space-xs);
  transition: color 0.3s ease;
}

.guest-side__option input[type="radio"]:checked ~ .guest-side__name {
  color: var(--color-rose-gold);
}

/* Conditional fields */
.rsvp-form__conditional {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.rsvp-form__conditional.is-visible {
  max-height: 300px;
  opacity: 1;
}

/* Decline message */
.rsvp-form__decline-message {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.rsvp-form__decline-message.is-visible {
  max-height: 1200px;
  opacity: 1;
}

.decline-message {
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  background: var(--color-blush);
  border-radius: 12px;
  border: 1px solid var(--color-rose-gold);
  margin-bottom: var(--space-xl);
}

.decline-message__icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.decline-message__text {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  color: var(--color-gray-dark);
  font-style: italic;
  line-height: 1.8;
}

.decline-message__bank {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-rose-gold);
}

.decline-message__qr {
  max-width: 200px;
  border-radius: 8px;
  margin-bottom: var(--space-md);
}

.decline-message__account {
  font-family: var(--font-serif);
  font-size: calc(var(--text-base) * 1.2);
  font-weight: 700;
  color: var(--color-rose-gold);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.decline-message__upload {
  width: 100%;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-rose-gold);
}

.decline-message__upload-input {
  display: none;
}

.decline-message__upload-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border: 2px dashed var(--color-rose-gold);
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--color-rose-gold);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.decline-message__upload-label:hover {
  background: var(--color-rose-gold);
  color: var(--color-white);
}

.decline-message__upload-label:hover svg {
  stroke: var(--color-white);
}

.decline-message__preview {
  position: relative;
  display: none;
  margin-top: var(--space-md);
  justify-content: center;
}

.decline-message__preview:not([hidden]) {
  display: flex;
}

.decline-message__preview-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid var(--color-gray-light);
}

.decline-message__progress {
  width: 100%;
  margin-top: var(--space-md);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.decline-message__progress:not([hidden]) {
  display: flex;
}

.decline-message__progress-percent {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-rose-gold);
}

.decline-message__progress-text {
  font-family: var(--font-serif);
  font-size: var(--text-xs);
  color: var(--color-gray-dark);
}

.decline-message__remove-slip {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--color-rose-gold);
  color: var(--color-white);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Submit button */
.rsvp-form__submit {
  display: block;
  width: 100%;
  margin-top: var(--space-lg);
}

/* Success state */
.rsvp-success {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  animation: fadeInScale 0.6s ease;
}

.rsvp-success__hearts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.rsvp-success__hearts svg {
  width: 60px;
  height: 60px;
}

.rsvp-success__hearts svg:nth-child(2) {
  width: 80px;
  height: 80px;
}

.rsvp-success__hearts svg:nth-child(1) {
  animation: heartBounce 1s ease 0.2s;
}

.rsvp-success__hearts svg:nth-child(2) {
  animation: heartBounce 1s ease 0.4s;
}

.rsvp-success__hearts svg:nth-child(3) {
  animation: heartBounce 1s ease 0.6s;
}

@keyframes heartBounce {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.9); }
}

.rsvp-success__title {
  font-family: var(--font-script);
  font-size: var(--text-3xl);
  color: var(--color-rose-gold);
  margin-bottom: var(--space-md);
}

.rsvp-success__message {
  font-family: var(--font-serif);
  font-size: calc(var(--text-lg) * 1.3);
  color: var(--color-gray-dark);
  font-style: italic;
  line-height: 1.8;
}

.rsvp-success__highlight {
  color: var(--color-rose-gold);
  font-weight: 700;
  font-style: normal;
}

.rsvp-success__name {
  font-weight: 700;
  color: var(--color-rose-gold);
  font-style: normal;
}
