/* Fullscreen Cover */
.wrsvp-cover-invitation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 99999;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    transition: all 1s ease-in-out;
    overflow: hidden;
}

/* Layout: Fullscreen (Standard) */
.wrsvp-layout-fullscreen .wrsvp-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Layout: Centered/Clean */
.wrsvp-layout-centered {
    /* Background color handled by inline style from widget control */
    background-image: none !important;
    /* Force override if user set bg but chose centered */
}

/* Centered Layout Specifics */
.wrsvp-layout-centered .wrsvp-cover-content {
    background: transparent;
    /* No glass effect by default for clean look, or optional */
    border: none;
    box-shadow: none;
    width: 100%;
    max-width: 500px;
}

.wrsvp-layout-centered .wrsvp-cover-photo-frame {
    width: 280px;
    /* Larger photo for centered layout */
    height: 350px;
    /* Rectangular portrait */
    border-radius: 20px;
    /* Softer radius */
    border: 5px solid #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.wrsvp-layout-centered .wrsvp-cover-photo-frame img {
    border-radius: 15px;
    /* Inner radius */
}

.wrsvp-layout-centered .wrsvp-couple-names {
    color: #333;
    /* Default, overridden by control */
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-top: 20px;
}

/* Particles Container */
#wrsvp-particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

/* Content Container */
.wrsvp-cover-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    animation: wrsvpFadeInUp 1s ease-out;
}

/* Photo Frame (Default Fullscreen Style) */
.wrsvp-cover-photo-frame {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.wrsvp-cover-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Names */
.wrsvp-couple-names {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Shadow on fullscreen */
}

.wrsvp-layout-centered .wrsvp-couple-names {
    text-shadow: none;
    /* Clean look */
}

.wrsvp-couple-names .wrsvp-and {
    font-size: 0.6em;
    font-style: italic;
    display: block;
    margin: 5px 0;
    font-family: 'Dancing Script', cursive;
}

.wrsvp-date {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Guest Box */
.wrsvp-guest-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wrsvp-layout-centered .wrsvp-guest-box {
    background: transparent;
    border: none;
    backdrop-filter: none;
    color: inherit;
}

.wrsvp-greeting {
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-style: italic;
}

.wrsvp-guest-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

/* Open Button */
.wrsvp-open-btn {
    background: #fff;
    color: #333;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.wrsvp-layout-centered .wrsvp-open-btn {
    background: #8e6e53;
    /* Brownish/Gold default */
    color: #fff;
    box-shadow: 0 10px 20px rgba(142, 110, 83, 0.3);
}

.wrsvp-open-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* --- EXIT ANIMATIONS --- */

/* Base Hidden State */
.wrsvp-cover-hidden {
    pointer-events: none;
}

/* Slide Up (Default) */
.wrsvp-anim-slide_up.wrsvp-cover-hidden {
    opacity: 0;
    transform: translateY(-100%);
    /* Slide completely out */
    transition: all 1s ease-in-out;
}

/* Fade Out */
.wrsvp-anim-fade_out.wrsvp-cover-hidden {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* Zoom Out */
.wrsvp-anim-zoom_out.wrsvp-cover-hidden {
    opacity: 0;
    transform: scale(1.5);
    /* Scale UP and fade out looks like flying through */
    transition: all 0.8s ease-in;
}

/* Animations */
@keyframes wrsvpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wrsvp-couple-names {
        font-size: 2.5rem;
    }

    .wrsvp-cover-photo-frame {
        width: 120px;
        height: 120px;
    }

    .wrsvp-layout-centered .wrsvp-cover-photo-frame {
        width: 220px;
        height: 280px;
    }
}

/* ============================================
   CUSTOM MODE STYLES
   ============================================ */

/* Target Section - The container marked by JS */
.wrsvp-cover-target-section {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 99999 !important;
    overflow: hidden !important;
    /* Smooth transition base */
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* NO backdrop - let Elementor container background show */

/* Custom Wrapper Styles */
.wrsvp-cover-custom-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Open Button Wrapper in Custom Mode */
.wrsvp-cover-custom-wrapper .wrsvp-open-btn-wrapper {
    position: relative;
    z-index: 100;
}

/* Particles Container for Custom Mode */
#wrsvp-particles-js-custom,
[id^="particles-"] {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* ============================================
   EXIT ANIMATIONS (Enhanced)
   ============================================ */

/* Slide Up - Smooth elegant exit */
.wrsvp-cover-target-section.wrsvp-anim-slide_up.wrsvp-cover-hidden,
.wrsvp-cover-invitation.wrsvp-anim-slide_up.wrsvp-cover-hidden {
    opacity: 0 !important;
    transform: translateY(-100%) !important;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Fade Out - Elegant dissolve */
.wrsvp-cover-target-section.wrsvp-anim-fade_out.wrsvp-cover-hidden,
.wrsvp-cover-invitation.wrsvp-anim-fade_out.wrsvp-cover-hidden {
    opacity: 0 !important;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Zoom Out - Fly through effect */
.wrsvp-cover-target-section.wrsvp-anim-zoom_out.wrsvp-cover-hidden,
.wrsvp-cover-invitation.wrsvp-anim-zoom_out.wrsvp-cover-hidden {
    opacity: 0 !important;
    transform: scale(1.5) !important;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hidden state - ensure it doesn't block interactions */
.wrsvp-cover-target-section.wrsvp-cover-hidden,
.wrsvp-cover-invitation.wrsvp-cover-hidden {
    pointer-events: none !important;
}

/* Scroll Lock Body State */
body.wrsvp-scroll-locked {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ============================================
   ELEMENTOR EDITOR PREVIEW FIXES
   ============================================ */
.elementor-editor-active .wrsvp-cover-target-section {
    position: relative !important;
    height: auto !important;
    min-height: 100vh;
}

.elementor-editor-active body.wrsvp-scroll-locked {
    overflow: auto !important;
    position: static;
}