/* ============================================== */
/* --- 6. RSVP SECTION (FINAL POLISHED VERSION) --- */
/* ============================================== */

/* --- MAIN SECTION CONTAINER --- */
.RSVP {
    background-color: #95B8D6; 
    color: #FFFFFF;
    padding: clamp(3rem, 8vw, 6rem) 1rem; 
    box-sizing: border-box;
    text-align: center;
    width: 100%;
    position: relative;
}

.RSVP h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(3rem, 6vw, 4.5rem); 
    color: #FFFFFF;
    margin: 0 0 1rem 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rsvp-subtext {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin: 0.5rem 0;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

/* --- FORM LAYOUT --- */
#rsvpForm {
    display: flex;
    flex-direction: column;
    gap: 2rem; 
    max-width: 650px; 
    margin: 3.5rem auto 0;
    text-align: left;
}

.form-group {
    margin-bottom: 0.5rem;
    position: relative;
}

/* --- LABELS & NOTES (FORM) --- */
#rsvpForm label {
    display: block;
    color: #FFFFFF;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    letter-spacing: 0.02em;
}

#rsvpForm .form-group:first-of-type label {
    text-align: center; 
}

.small-note {
    font-weight: 400;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.85);
    margin-left: 0.5rem;
}

.display-block {
    display: block;
    margin-top: 6px; 
    margin-left: 0 !important;
    font-size: 0.85em !important;
    font-weight: 400 !important;
    opacity: 0.9;
}


/* --- INPUTS: GLASSMORPHISM --- */
#rsvpForm input[type="text"],
#rsvpForm select,
#rsvpForm textarea {
    width: 100%;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4); 
    box-sizing: border-box;
    outline: none;
    background-color: rgba(255, 255, 255, 0.85); 
    color: #35302A; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
}

#rsvpForm textarea {
    min-height: 140px;
    resize: vertical;
}

#rsvpForm input:focus,
#rsvpForm select:focus,
#rsvpForm textarea:focus {
    background-color: #FFFFFF;
    border-color: #FFD6A6;
    box-shadow: 0 0 0 4px rgba(255, 214, 166, 0.4);
    transform: translateY(-2px);
}

#rsvpForm input[readonly]#guestName {
    background-color: transparent; 
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5); 
    border-radius: 0;
    box-shadow: none;
    color: #FFFFFF;
    font-family: 'DM Serif Display', serif; 
    font-size: clamp(1.8rem, 4vw, 2.2rem); 
    text-align: center;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    cursor: default;
    backdrop-filter: none;
    pointer-events: none
}

#rsvpForm input[readonly]:not(#guestName),
#rsvpForm select:disabled { 
    background-color: rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    border: 1px dashed rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    box-shadow: none;
}
#rsvpForm input[readonly]:not(#guestName)::placeholder {
    color: rgba(255, 255, 255, 0.7);
}


/* --- ENHANCED CHECKBOX AREA --- */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.checkbox-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-wrapper label {
    margin-bottom: 0 !important;
    line-height: 1.3;
    padding-top: 2px; 
    font-weight: 700;
}

#rsvpForm input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    cursor: pointer;
    display: grid;
    place-content: center;
    /* FIX: Push the checkbox down slightly for visual alignment */
    margin-top: 0.5px !important; 
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

#rsvpForm input[type="checkbox"]:checked {
    background-color: #FFD6A6;
    border-color: #FFFFFF;
}

#rsvpForm input[type="checkbox"]::before {
    content: "✓";
    font-size: 16px;
    font-weight: 800;
    color: #35302A;
    transform: scale(0);
    transition: 0.2s transform cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#rsvpForm input[type="checkbox"]:checked::before {
    transform: scale(1);
}


/* --- BUTTONS & BUTTON GROUP --- */
.rsvp-button-group {
    margin-top: 3rem; 
    text-align: center;
}

.button-instruction {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 1.2rem; 
    color: #FFFFFF;
    margin-bottom: 2rem; 
    opacity: 0.9;
}

.rsvp-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.rsvp-buttons button {
    flex: 1;
    min-width: 220px;
    padding: 1.2rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-will-go {
    background-color: #FFD6A6;
    color: #35302A;
    box-shadow: 0 4px 15px rgba(255, 214, 166, 0.25);
}

.btn-will-go:hover {
    background-color: #FFC585;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 214, 166, 0.4);
}

.btn-cant-go {
    background-color: rgba(255, 255, 255, 0.9);
    color: #426A8D;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-cant-go:hover {
    background-color: #FFFFFF;
    color: #2A4D69;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}


/* --- UTILITY & FUNCTIONALITY --- */

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    color: #FFFFFF;
    margin: 2rem 0;
}

/* HEART SPINNER STYLES */
.heart-spinner-container {
    display: inline-block;
    animation: spin-container 1.5s linear infinite;
    margin-bottom: 1rem;
    font-size: 0;
}

.heart-icon {
    font-size: 2.5rem;
    display: block;
    line-height: 1;
    transform-origin: center;
    animation: pulse-heart 1.5s ease-in-out infinite;
}

@keyframes spin-container {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes pulse-heart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.spinnerText {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* --- SUMMARY BOX (POST SUBMISSION) --- */
.summary-box {
    background-color: #FFFFFF;
    color: #426A8D;
    padding: clamp(2rem, 5vw, 3.5rem);
    border-radius: 16px;
    max-width: 600px;
    margin: 2rem auto;
    text-align: left;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    position: relative;
}

/* FIX: Enhanced Header - Centered and no underline */
.summary-box h3 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem); 
    color: #35302A;
    margin-top: 0;
    margin-bottom: 2rem; 
    text-align: center; 
    font-weight: 400; 
    text-decoration: none; 
}

/* FIX: Style the data rows */
.summary-box p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #E6EBF0;
    padding-bottom: 0.8rem;
    color: #426A8D; 
    display: flex;
    justify-content: space-between;
}

.summary-box p:last-of-type {
    border-bottom: none;
}

/* FIX: Emphasize the submitted response data */
.summary-box strong {
    font-weight: 700;
    color: #35302A; 
    text-align: right;
    max-width: 50%; 
}

/* FIX: Edit Button (Pill shape and hover effect) */
.edit-button {
    display: block;
    width: 100%;
    margin-top: 2rem;
    background-color: #95B8D6;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    border-radius: 50px; 
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(149, 184, 214, 0.4); 
}

.edit-button:hover {
    background-color: #7296B3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(149, 184, 214, 0.7);
}

/* --- MOBILE --- */
@media (max-width: 600px) {
    .rsvp-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    .rsvp-buttons button {
        width: 100%;
    }
    
    #rsvpForm input[readonly]#guestName {
        font-size: 1.6rem;
    }
}

/* ============================================== */
/* --- RSVP MICRO-POLISH OVERRIDES (SAFE) -------- */
/* ============================================== */

/* 1. Give RSVP section more separation from navbar */
.RSVP {
    padding-top: clamp(5rem, 12vw, 7rem);
}

/* 2. Subtle emphasis for guest name (ceremonial feel) */
#rsvpForm input[readonly]#guestName {
    letter-spacing: 0.04em;
}

/* 3. Slightly stronger depth for inputs (still elegant) */
#rsvpForm input[type="text"],
#rsvpForm select,
#rsvpForm textarea {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Focus state stays calm */
#rsvpForm input:focus,
#rsvpForm select:focus,
#rsvpForm textarea:focus {
    box-shadow: 0 0 0 4px rgba(255, 214, 166, 0.35);
}

/* 4. Give summary edit button better separation */
.edit-button {
    margin-top: 2.5rem;
}

.guest-name-display {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: #FFFFFF;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;

    /* 🔑 WRAPPING MAGIC */
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}