/* Sección RSVP dentro de index.html (solo visible con ?code=...) */
.rsvp-section [hidden],
.rsvp-section[hidden],
.rsvp-toast[hidden],
.nav-links a[hidden] {
    display: none !important
}

.rsvp-section {
    padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 6vw, 6rem);
    background:
        linear-gradient(180deg, rgba(19, 31, 25, .78), rgba(19, 31, 25, .9)),
        url("../js/assets/images/rvsp-bg.webp") center/cover fixed;
    color: var(--paper);
    scroll-margin-top: 0
}

.rsvp-inner {
    max-width: 620px;
    margin: auto
}

.rsvp-heading {
    text-align: center;
    margin-bottom: 2.5rem;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .28)
}

.rsvp-heading .kicker {
    color: #dfc497
}

.rsvp-guest {
    margin: 1.5rem 0 .4rem;
    font: 400 clamp(2rem, 6vw, 3.2rem)/1.05 Italiana, Georgia, serif
}

.rsvp-message {
    max-width: 520px;
    margin-inline: auto;
    font-size: .95rem;
    letter-spacing: .02em
}

.plus-one-notice {
    width: fit-content;
    max-width: 100%;
    margin: 1.25rem auto 0;
    padding: .75rem 1rem;
    border: 1px solid rgba(223, 196, 151, .65);
    background: rgba(255, 253, 248, .12);
    font-size: .82rem;
    font-weight: 500;
    backdrop-filter: blur(6px)
}

.plus-one-notice i {
    margin-right: .45rem;
    color: #dfc497
}

.rsvp-card {
    padding: clamp(1.5rem, 5vw, 2.5rem);
    background: rgba(255, 253, 248, .96);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--forest), #a36f58, #dfc497) 1
}

.rsvp-card h3 {
    margin-bottom: 1.5rem;
    color: var(--forest);
    font-size: 2rem
}

.rsvp-members {
    display: grid;
    gap: .6rem;
    margin-bottom: 1.75rem;
    transition: outline-color .2s
}

.rsvp-members.has-error {
    outline: 1px solid #b4453a;
    outline-offset: .5rem
}

.rsvp-member {
    padding: 1rem;
    border: 1px solid #d9d0c3;
    background: var(--paper);
    transition: border-color .2s, box-shadow .2s
}

.rsvp-member:focus-within {
    border-color: #a36f58;
    box-shadow: 0 0 0 3px rgba(163, 111, 88, .12)
}

.rsvp-member-check {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    cursor: pointer
}

.rsvp-member-check input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: .3rem;
    accent-color: var(--forest);
    flex-shrink: 0
}

.rsvp-member-check strong {
    display: block;
    font-weight: 500
}

.rsvp-member-check small,
.rsvp-member-diet label {
    color: var(--muted);
    font-size: .8rem
}

.rsvp-member-diet {
    margin: .6rem 0 0 1.95rem
}

.rsvp-member-diet label {
    display: block;
    margin-bottom: .25rem
}

.rsvp-member-diet select {
    width: 100%;
    padding: .45rem .6rem;
    border: 1px solid #d9d0c3;
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .88rem
}

.rsvp-member-diet select:focus-visible {
    outline: 2px solid #a36f58;
    outline-offset: 1px
}

.rsvp-actions {
    display: grid;
    gap: .6rem
}

.rsvp-actions .button {
    min-height: 52px;
    gap: .5rem;
    cursor: pointer;
    font-family: inherit
}

.rsvp-actions .button i {
    font-size: 1rem
}

.rsvp-actions .button:disabled {
    opacity: .6;
    cursor: wait
}

.rsvp-confirm {
    border: 1px solid var(--forest);
    background: var(--forest);
    color: #fff
}

.rsvp-confirm:hover {
    background: #17241e
}

.rsvp-decline {
    background: transparent;
    border-color: #a36f58;
    color: #86523f
}

.rsvp-decline:hover {
    background: #86523f;
    color: #fff
}

.rsvp-alert {
    margin-top: 1.5rem;
    padding: 1.1rem 1.25rem;
    text-align: center;
    background: #e7eef0;
    color: #1f3a44;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .18)
}

.rsvp-alert-success {
    background: #e3efe6;
    color: #1d4a2c
}

.rsvp-link-button {
    margin-top: .5rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer
}

.rsvp-toast {
    position: fixed;
    z-index: 1100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 380px);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .35rem .75rem;
    padding: 1rem 1.1rem;
    border: 1px solid #b4453a;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3)
}

.rsvp-toast strong {
    color: #b4453a
}

.rsvp-toast span {
    grid-column: 1 / -1;
    font-size: .9rem
}

.rsvp-toast button {
    grid-row: 1;
    grid-column: 2;
    border: 0;
    background: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer
}

.rsvp-actions .button:focus-visible,
.rsvp-link-button:focus-visible,
.rsvp-toast button:focus-visible {
    outline: 2px solid #dfc497;
    outline-offset: 3px
}

@media (max-width: 760px) {
    .rsvp-section {
        background-attachment: scroll
    }
}

@media (prefers-reduced-motion: reduce) {
    .rsvp-member,
    .rsvp-members {
        transition: none
    }
}
