/* ============================================
   RSVP MODAL OVERLAY
============================================ */
.rsvp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    padding-bottom: 60px;
    z-index: 9999;
    overflow-y: auto;
    backdrop-filter: blur(6px);
}

.rsvp-modal-overlay.rsvp-visible {
    display: flex;
}

.rsvp-modal-shell {
    width: 100%;
    max-width: 720px;
    padding: 20px;
    position: relative;
}

.rsvp-close-btn {
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 32px;
    color: #f5f3ed;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 20;
}


/* ============================================
   ENVELOPE SECTION
============================================ */
#envelopeSection {
    width: 100%;
    display: block;
}

.envelope-scene {
    perspective: 1600px;
    display: flex;
    justify-content: center;
}

.envelope-scene {
    position: relative;
    z-index: 2;
}

.envelope-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

.envelope-3d {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 360px;
    margin: 0 auto;
    background: transparent;
    transform-style: preserve-3d;
    z-index: 5;
}

.envelope-3d::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;   /* or #0f0f0f to match your envelope */
    z-index: -1;
    border-radius: 16px;
}


.envelope-back {
    position: absolute;
    inset: 0;
    background: #050505;
    border-radius: 16px;
    border: 2px solid #d8d2c4;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

.envelope-front {
    position: absolute;
    inset: 0;
}

.envelope-body {
    position: absolute;
    inset: 40px 24px 24px 24px;
    background: linear-gradient(135deg,#1b1b1b,#121212);
    border-radius: 12px;
    border: 1px solid rgba(200,200,200,0.4);
}

.envelope-flap {
    position: absolute;
    top: 0;
    width: 100%;
    height: 50%;
    transform-origin: top center;
}

.envelope-flap::before {
    content:"";
    position:absolute;
    top:0;
    left:50%;
    transform:translateX(-50%);
    border-left: 52% solid transparent;
    border-right: 52% solid transparent;
    border-bottom:150px solid #0f0f0f;
}

.envelope-flap::after {
    content:"";
    position:absolute;
    top:0;
    left:50%;
    transform:translateX(-50%);
    border-left: 52% solid transparent;
    border-right: 52% solid transparent;
    border-bottom:150px solid transparent;
    box-shadow:0 0 0 2px rgba(216,210,196,0.6);
}

#envelopeSection .rsvp-step {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ============================================
   INVITE CARD
============================================ */
.invite-card {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);
    width: calc(100% - 90px);
    background: #f5f5f0;
    border-radius: 12px;
    border: 1px solid rgba(90,78,64,0.4);
    box-shadow: 0 14px 32px rgba(0,0,0,0.5);
    padding: 24px 28px;
    min-height: 300px;
    overflow: visible;
}

/* RSVP Steps */
.rsvp-steps {
    position: relative;
    width: 100%;
}

.rsvp-step {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    text-align: center;
    transition: .25s ease;
}

.rsvp-step-active {
    opacity: 1;
    pointer-events: all;
}

.rsvp-heading {
    font-family: "Playfair Display", serif;
    font-size: 1.6rem;
    text-transform: uppercase;
    margin-bottom: 14px;
    color: #000;
}

.rsvp-subcopy {
    font-size: .9rem;
    color: #444;
    margin-bottom: 18px;
}

.rsvp-button-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.rsvp-step-btn {
    background: #000;
    border: 1px solid #000;
    color: white;
    padding: 10px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-size: .85rem;
}

.rsvp-step-btn:hover {
    background: white;
    color: black;
}


/* ============================================
   PLUS ONE FORM (FULL SIZE, OUTSIDE ENVELOPE)
============================================ */
#plusOneSection {
    display: none;
    width: 100%;
    max-width: 620px;
    margin: 30px auto 0 auto;
    background: rgba(255,255,255,0.98);
    padding: 26px 30px;
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(0,0,0,0.45);
}

#plusOneSection.rsvp-visible {
    display: block;
}

.rsvp-fieldset {
    border: 1px solid rgba(60,60,60,0.3);
    border-radius: 10px;
    padding: 16px;
    margin-top: 10px;
}

.rsvp-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
}

.rsvp-field-full {
    grid-column: 1 / -1;
}

.rsvp-field label {
    font-size: .8rem;
    display: block;
    margin-bottom: 4px;
}

.rsvp-field input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #aaa;
}

.rsvp-submit-btn {
    background: black;
    color: white;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: .9rem;
    border: none;
    cursor: pointer;
    transition: .2s;
}

.rsvp-submit-btn:hover {
    background: white;
    color: black;
    border: 1px solid black;
}


/* ============================================
   MOBILE
============================================ */
@media (max-width: 600px) {
    .envelope-3d {
        height: 420px;
    }

    #plusOneSection {
        margin-top: 40px;
        padding: 20px;
    }
}


.rsvp-error {
    border-color: red !important;
    background: #ffecec !important;
}

.rsvp-step[data-step="1"].rsvp-step-active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}
.invite-card {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsvp-steps {
    width: 100%;
}

/* Google Autocomplete Dropdown Fix */
.pac-container {
    z-index: 999999 !important;
}

/* ============================================
   LOADING STATES + FRIENDLY MESSAGES
============================================ */

/* Button loading spinner */
/* ============================================
   LUXURY PLATINUM VINYL LOADER
============================================ */

/* .preloader-wrap {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.6s ease;
} */

/* Vinyl container */
.loader-vinyl {
    width: 180px;
    height: 180px;
    background-image: url('images/vinyl-loader.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: vinyl-spin 4s linear infinite,
               vinyl-tilt 3.2s ease-in-out infinite,
               vinyl-pulse 2.6s ease-in-out infinite;
    position: relative;
}

/* Metallic shimmer overlay */
.loader-vinyl::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.2) 45%,
        rgba(255,255,255,0) 80%
    );
    mix-blend-mode: screen;
    opacity: 0.0;
    animation: vinyl-shimmer 3s ease-in-out infinite;
    border-radius: 50%;
}

#rsvpGlobalLoader {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

#rsvpGlobalLoader.visible {
    opacity: 1;
    pointer-events: all;
}

/* Center container */
.vinyl-loader-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 900px;
}

/* Vinyl styling + animations */
.vinyl-loader {
    width: 150px;
    height: 150px;
    animation: vinylSpin 2.6s linear infinite,
               vinylTilt 3s ease-in-out infinite,
               vinylPulse 2.2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.25));
    transform-style: preserve-3d;
}

.vinyl-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.2) 45%,
        rgba(255,255,255,0) 80%
    );
    mix-blend-mode: screen;
    opacity: 0.0;
    animation: vinyl-shimmer 3s ease-in-out infinite;
    border-radius: 50%;
}

/* ============================================
   KEYFRAMES
============================================ */

/* Rotation */
@keyframes vinylSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Subtle 3D tilt movement */
@keyframes vinylTilt {
    0% { transform: rotateX(6deg) rotateY(0deg); }
    50% { transform: rotateX(-6deg) rotateY(6deg); }
    100% { transform: rotateX(6deg) rotateY(0deg); }
}

/* Gentle pulsing light like high-end audio equipment */
@keyframes vinylPulse {
    0% { filter: drop-shadow(0 0 6px rgba(255,255,255,0.15)); }
    50% { filter: drop-shadow(0 0 14px rgba(255,255,255,0.38)); }
    100% { filter: drop-shadow(0 0 6px rgba(255,255,255,0.15)); }
}

/* Metallic shimmer sweep */
@keyframes vinyl-shimmer {
    0%   { opacity: 0; transform: translateX(-40%) rotate(0deg); }
    45%  { opacity: 0.35; transform: translateX(40%) rotate(8deg); }
    100% { opacity: 0; transform: translateX(120%) rotate(12deg); }
}

/* When preloader finishes */
.preloader-wrap.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Success + Error message bubbles */
.rsvp-error-message {
    background: rgba(125, 0, 0, 0.85);
    color: #ffcccc;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    border: 1px solid rgba(255,0,0,0.35);
}

.rsvp-success-message {
    background: rgba(0, 80, 20, 0.85);
    color: #c7ffd8;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    border: 1px solid rgba(0,255,128,0.35);
}
