/* S10 · Form xác nhận tham dự + popup cảm ơn (E12) */
.rsvp { padding-top: 72px; padding-bottom: 80px; }
.rsvp__intro { max-width: 320px; margin: 0 auto 26px; font-size: 13.5px; line-height: 1.8; text-wrap: balance; }
.rsvp__form { display: grid; gap: 12px; max-width: 360px; margin: 0 auto; text-align: left; }
.field input, .field textarea, .field select {
  display: block;
  width: 100%;
  padding: 11px 18px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  font: 400 16px/1.4 var(--sans); /* ≥16px để iOS không phóng to khi chạm vào ô */
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 104px; border-radius: 18px; resize: vertical; }
.field select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23054B26' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px 8px;
}
.field select:invalid, .field ::placeholder { color: #8a948c; }
.field select option { color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 0 0 0 3px rgba(5, 75, 38, .15); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--error); }
.field__error { margin: 4px 18px 0; font-size: 12px; color: var(--error); }
.field__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn {
  position: relative; height: 48px; margin-top: 6px; border: 0; border-radius: 999px;
  background: var(--green); color: #fff; font: 600 14px/1 var(--sans); letter-spacing: .24em;
  cursor: pointer; transition: background .2s, transform .2s;
}
.btn:hover { background: var(--green-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { cursor: progress; }
.btn__dots { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 7px; }
.btn__dots i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: dot 1s ease-in-out infinite; }
.btn__dots i:nth-child(2) { animation-delay: .15s; }
.btn__dots i:nth-child(3) { animation-delay: .3s; }
.btn.is-busy .btn__label { visibility: hidden; }
.btn.is-busy .btn__dots { display: flex; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: scale(.75); } 40% { opacity: 1; transform: scale(1); } }
.rsvp__status { min-height: 1.4em; font-size: 13px; color: var(--error); text-align: center; }

.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) 24px max(24px, env(safe-area-inset-bottom, 0px));
}
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10, 20, 14, .62); opacity: 0; transition: opacity .35s var(--ease); }
.modal__card {
  position: relative; width: min(100%, 360px); overflow: hidden; border-radius: 6px;
  background: var(--paper); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); text-align: center;
  opacity: 0; transform: translateY(24px) scale(.96);
  transition: opacity .35s var(--ease), transform .45s var(--ease-out);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__card { opacity: 1; transform: none; }
.modal__close {
  position: absolute; top: 8px; right: 8px; z-index: 1; display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); cursor: pointer;
}
.modal__close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.modal__photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--green-soft); }
.modal__body { padding: 18px 22px 22px; }
.modal__title { font: 600 15px/1.5 var(--sans); color: var(--green); }
.modal__text { margin-top: 6px; font-size: 13.5px; }
.modal__script { margin-top: 8px; font: 400 44px/1.1 var(--script); color: var(--green); }
html.modal-open { overflow: hidden; }
