/* Personalized Invitation Styles */

/* Invite Page */
.invitation-page {
    background-image: url("/images/colombian_landscape.jpeg");
    background-size: cover; /* Scales the image to cover the container */
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents tiling */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.invite-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
}

.invitation {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.invitation::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(
        90deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%
    );
}

/* Invitation Header */
.invitation-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--primary-color);
}

.invitation-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: var(--serif-font);
    color: var(--primary-color);
}

/* Invitation Body */
.invitation-body {
    margin-bottom: 30px;
}

.invite-to {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 500;
    font-family: var(--serif-font);
    font-style: italic;
}

.invite-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-align: left;
    font-family: var(--serif-font);
    font-style: italic;
}

.invite-details {
    text-align: left;
    margin-left: 25px;
    margin-bottom: 40px;
}

.invite-details p {
    margin-bottom: 10px;
}

.invite-details strong {
    font-weight: 600;
    color: var(--secondary-color);
}

/* RSVP Form Styles */
.rsvp-form {
    background-color: var(--light-color);
    border: 2px solid var(--primary-color);
    padding: 25px;
    border-radius: 6px;
    margin-top: 30px;
}

.rsvp-form h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group select {
    color: var(--secondary-color);
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--sans-font);
    font-size: 1rem;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-group input {
    margin-right: 10px;
}

.rsvp-form select,
.rsvp-form input[type="text"],
.rsvp-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--sans-font);
    font-size: 1rem;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.rsvp-form select:focus,
.rsvp-form input[type="text"]:focus,
.rsvp-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.1);
}

.rsvp-form textarea {
    height: 100px;
    resize: vertical;
}

.rsvp-form button {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
}

.success-message {
    text-align: center;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: 4px;
    color: var(--secondary-color);
    font-weight: 400;
}

/* Invitation Footer */
.invitation-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--primary-color);
}

.invitation-footer a {
    color: var(--secondary-color);
    text-decoration: underline;
    font-size: 0.9rem;
}

.invitation-footer a:hover {
    color: var(--primary-color);
}

/* Food Restrictions Animation */
#food-restrictions-text {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: scale(0.95);
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
}

#food-restrictions-text.show {
    max-height: 100px;
    opacity: 1;
    margin-top: 10px;
    transform: scale(1);
}

#restrictions-input {
    transform: translateY(-15px) scale(0.98);
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease-out;
}

#food-restrictions-text.show #restrictions-input {
    transform: translateY(0) scale(1);
}

#restrictions-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.1);
    transform: translateY(0) scale(1);
}

/* Attending-based form sections animation */
#guests-attending,
#food-restrictions,
#message-box {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: scale(0.95);
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}

#guests-attending.show,
#food-restrictions.show,
#message-box.show {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 20px;
    transform: scale(1);
}

#guests-attending select,
#food-restrictions select,
#food-restrictions label,
#message-box label,
#message-box textarea {
    transform: translateY(-15px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#guests-attending.show select,
#food-restrictions.show select,
#food-restrictions.show label,
#message-box.show label,
#message-box.show textarea {
    transform: translateY(0) scale(1);
}

/* Update Banner Styles */
.update-banner {
    background-color: var(--accent-color);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.update-banner strong {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design for Invitation */
@media (max-width: 600px) {
    .invitation {
        padding: 25px 15px;
    }

    .invitation-header h1 {
        font-size: 2.2rem;
    }

    .invite-date {
        font-size: 1.2rem;
    }

    .radio-group {
        gap: 5px;
    }

    /* Mobile-specific food restrictions animation */
    #food-restrictions-text.show {
        max-height: 120px;
    }

    #restrictions-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Mobile-specific attending form sections animation */
    #guests-attending.show,
    #food-restrictions.show,
    #message-box.show {
        max-height: 250px;
    }

    /* Mobile update banner */
    .update-banner {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}
