/* RSVP Section */
.rsvp-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    height: auto;
    min-height: auto;
    position: relative;
    isolation: isolate;
    z-index: 30;
    margin: 0;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background-color: var(--bg1);
}

.rsvp-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 27% at var(--rsvp-glow-x, 50%) var(--rsvp-glow-y, 93%), var(--color-white-95) 0%, var(--color-white-56) 34%, var(--color-transparent-white) 100%);
    z-index: 1;
    mix-blend-mode: screen;
    opacity: 0.95;
    pointer-events: none;
}

.rsvp-section > * {
    position: relative;
    z-index: 60;
}

.rsvp-section .section-title,
.rsvp-section .wedding-list-note,
.rsvp-section .guest-list,
.rsvp-section .guest-row,
.rsvp-section .guest-name,
.rsvp-section .guest-choice,
.rsvp-section .guest-choice span,
.rsvp-section .guest-choice input,
.rsvp-section .rsvp-submit,
.rsvp-section .submit-status {
    position: relative;
    z-index: 70;
}

html.is-safari-ios .rsvp-section {
    min-height: auto;
}

.rsvp-section[hidden] {
    display: none;
}

.rsvp-title {
    font-size: 1.8rem;
    font-weight: 600;
    font-family: "Cormorant Garamond", serif;
    letter-spacing: 0.12em;
    text-align: center;
    color: var(--color-text-primary);
}

.rsvp-section .section-title {
    color: var(--oliveGreen);
    font-size: 3.3rem;
}

.rsvp-section .guest-list,
.rsvp-section .rsvp-submit,
.rsvp-section .submit-status {
    margin-top: 24px;
}

/* Guest list */
.guest-list {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
}

.guest-row.has-error {
    border-color: var(--color-danger);
    background: var(--color-danger-bg);
}

.guest-name {
    font-size: 1rem;
    color: var(--oliveGreen);
    font-family: "Inter", sans-serif;
    font-weight: 300;
    flex: 1;
    margin-right: 16px;
}

.guest-choices {
    display: flex;
    gap: 20px;
}

.guest-choice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--oliveGreen);
    font-family: "Inter", sans-serif;
    font-weight: 300;
}

.guest-choice input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--oliveGreen);
    border-radius: 0;
    background-color: var(--color-olive-08);
    display: inline-grid;
    place-content: center;
}

#rsvp-bottom-leaves-wrap--inside {
    position: relative;
    z-index: 0;
    width: calc(100% + 48px);
    max-width: none;
    margin: 0 -24px;
}

.rsvp-bottom-leaves-wrap {
    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.guest-choice input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    background-color: var(--oliveGreen);
    transform: scale(0);
    transition: transform 0.15s ease-in-out;
}

.guest-choice input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Submit */
.rsvp-submit {
    width: auto;
    max-width: none;
    padding: 12px 32px;
    background-color: var(--oliveGreen);
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 300;
    font-family: "Inter", sans-serif;
    letter-spacing: normal;
    text-transform: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-align: center;
}

.rsvp-submit:hover,
.rsvp-submit:focus {
    opacity: 0.9;
    outline: none;
}

.rsvp-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rsvp-divider {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding-left: 20px;
    padding-right: 20px;
    margin-top: 8px;
}

.wedding-list-note {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-family: "Inter", sans-serif;
    font-weight: 400;
    text-align: center;
    line-height: 1.4;
    margin-top: 16px;
}

.rsvp-section .wedding-list-note {
    color: var(--color-text-muted);
    font-weight: 400;
}

.wedding-list-details {
    font-size: 0.99rem;
    color: var(--color-olive-80);
    font-family: "Inter", sans-serif;
    font-weight: 300;
    text-align: center;
    line-height: 1.2;
    margin-top: 2.8em;
}

.wedding-list-details > span:not(.wedding-list-label) {
    font-size: 0.75em;
}

.wedding-list-label {
    font-weight: 600;
}

.submit-status {
    min-height: 1.2em;
    color: var(--color-danger);
    font-size: 0.9rem;
    text-align: center;
}

/* Thank you screen */
.thank-you-screen {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    background-color: var(--bg2);
    position: relative;
}

.thank-you-screen .transition-message,
.thank-you-screen .section-placeholder.transition-note {
    color: var(--oliveGreen);
}

.rsvp-confirm-modal {
    position: fixed;
    inset: 0;
    background: var(--color-overlay-black-28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
}

.rsvp-confirm-modal[hidden] {
    display: none;
}

.rsvp-confirm-dialog {
    width: min(420px, 100%);
    background: var(--color-white);
    border: 1px solid var(--color-olive-20);
    padding: 28px 24px;
    text-align: center;
}

.rsvp-confirm-title {
    color: var(--oliveGreen);
    font-family: "Inter", sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0 0 18px;
}

.rsvp-confirm-done {
    border: none;
    border-radius: 0;
    background-color: var(--oliveGreen);
    color: var(--color-white);
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 300;
    padding: 10px 28px;
    cursor: pointer;
}
