/* 
 * easyRSVP Frontend Styles
 * Mobile-first, elegant, standalone
 */
 :root {
    --easyrsvp-bg: #f8fafc;
    --easyrsvp-card: #ffffff;
    --easyrsvp-text: #0f172a;
    --easyrsvp-text-light: #64748b;
    --easyrsvp-text-title: #0f172a;
    --easyrsvp-text-main: #475569;
    --easyrsvp-text-muted: #64748b;
    /* Dynamically overwritten but defaults here */
    --easyrsvp-accent: #4f46e5;
    --easyrsvp-accent-hover: #4338ca;
    --easyrsvp-border: #e2e8f0;
    --easyrsvp-border-focus: #4f46e5;
    --easyrsvp-error: #f43f5e;
    --easyrsvp-success: #10b981;
    
    --easyrsvp-font-primary: 'Inter', -apple-system, sans-serif;
    --easyrsvp-radius: 14px;

    /* New Spacing System */
    --ersvp-space-xs: 0.5rem;   /* 8px */
    --ersvp-space-sm: 0.75rem;  /* 12px */
    --ersvp-space-md: 1rem;     /* 16px */
    --ersvp-space-lg: 1.5rem;   /* 24px */
    --ersvp-space-xl: 2rem;     /* 32px */
    --ersvp-space-2xl: 3rem;    /* 48px */
}

/* 
 * Local CSS Reset for Isolation 
 */
.easyrsvp-standalone,
.easyrsvp-standalone * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.easyrsvp-standalone {
    font-family: var(--easyrsvp-font-primary);
    background-color: var(--easyrsvp-bg);
    color: var(--easyrsvp-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.easyrsvp-standalone a {
    text-decoration: none;
    color: var(--easyrsvp-accent);
}

/* --- Premium Entry Animations --- */
@keyframes ersvp-reveal-down {
    0% { opacity: 0; transform: translateY(-40px) rotate(-2deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes ersvp-reveal-up {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes ersvp-reveal-scale {
    0% { opacity: 0; transform: scale(0.8) translateY(30px); }
    60% { transform: scale(1.03) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes ersvp-reveal-blur {
    0% { opacity: 0; filter: blur(15px); transform: scale(0.98); }
    100% { opacity: 1; filter: blur(0); transform: scale(1); }
}

@keyframes ersvp-title-reveal {
    0% { opacity: 0; transform: translateY(20px) skewY(2deg); filter: blur(8px); }
    100% { opacity: 1; transform: translateY(0) skewY(0); filter: blur(0); }
}

/* Staggered Entry for Header Elements */
.easyrsvp-header > * {
    opacity: 0;
    animation-fill-mode: forwards !important;
}

/* Specific Element Animations */
.easyrsvp-badge { 
    animation: ersvp-reveal-down 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; 
    animation-delay: 0.2s; 
}

.easyrsvp-host { 
    animation: ersvp-reveal-blur 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; 
    animation-delay: 0.4s; 
}

.easyrsvp-title { 
    animation: ersvp-title-reveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; 
    animation-delay: 0.6s; 
}

.easyrsvp-datetime { 
    animation: ersvp-reveal-up 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; 
    animation-delay: 0.8s; 
}

.easyrsvp-location { 
    animation: ersvp-reveal-up 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; 
    animation-delay: 0.95s; 
}

.easyrsvp-countdown-container { 
    animation: ersvp-reveal-scale 1.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; 
    animation-delay: 1.1s; 
}

.easyrsvp-message { 
    animation: ersvp-reveal-blur 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; 
    animation-delay: 1.3s; 
}

/* Form Reveal */
.easyrsvp-form-wrapper {
    opacity: 0;
    animation: ersvp-reveal-scale 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 1.5s;
}

.easyrsvp-deadline,
.easyrsvp-footer {
    opacity: 0;
    animation: ersvp-reveal-blur 1.8s ease forwards;
    animation-delay: 2s;
}

/* Disable stagger in preview for better UX while editing */
.is-preview .easyrsvp-header > *,
.is-preview .easyrsvp-form-wrapper,
.is-preview .easyrsvp-deadline,
.is-preview .easyrsvp-footer {
    animation-delay: 0.05s !important;
    animation-duration: 0.4s !important;
}

.easyrsvp-standalone h1, 
.easyrsvp-standalone h2, 
.easyrsvp-standalone h3 {
    margin: 0;
    font-family: var(--easyrsvp-font-primary);
    font-weight: 800;
}

.easyrsvp-standalone input,
.easyrsvp-standalone button,
.easyrsvp-standalone textarea,
.easyrsvp-standalone select {
    font-family: inherit;
    font-size: inherit;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
}
.easyrsvp-standalone button {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.easyrsvp-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: var(--ersvp-space-2xl) var(--ersvp-space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--ersvp-space-xl);
}

/* Header & Typography */
.easyrsvp-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ersvp-space-sm);
    margin: 0; /* Reset margin since container has gap */
}

.easyrsvp-host {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--easyrsvp-text-muted);
    margin-bottom: 0;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    max-width: 100%;
    transition: all 0.3s ease;
}

.easyrsvp-host.headline-style {
    font-size: clamp(24px, 6vw, 32px); /* Slightly smaller than main title but same vibe */
    font-weight: 800;
    text-transform: none;
    letter-spacing: -0.02em;
    color: var(--easyrsvp-text-title);
    line-height: 1.2;
}

.easyrsvp-title {
    font-family: var(--easyrsvp-font-primary);
    font-size: clamp(24px, 8vw, 38px);
    font-weight: 800;
    line-height: 1.25; /* Improved from 1.1 */
    margin: 0;
    color: var(--easyrsvp-text-title);
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.easyrsvp-datetime {
    font-size: 16px;
    font-weight: 400;
    color: var(--easyrsvp-text-main);
    margin-bottom: 0;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    max-width: 100%;
}

.easyrsvp-location {
    font-size: 15px;
    line-height: 1.5;
    color: var(--easyrsvp-text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    max-width: 100%;
}

.easyrsvp-location svg {
    color: var(--easyrsvp-text-light);
}

.easyrsvp-message {
    font-style: italic;
    color: var(--easyrsvp-text-main);
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.easyrsvp-form-wrapper {
    background: var(--easyrsvp-card);
    padding: var(--ersvp-space-xl);
    border-radius: var(--easyrsvp-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    border: 1px solid var(--easyrsvp-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: var(--ersvp-space-lg);
}

/* Glassmorphism effect when background image is present */
.has-bg-image .easyrsvp-form-wrapper {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
}

.easyrsvp-field {
    margin-bottom: 0;
}

.easyrsvp-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--easyrsvp-text);
}

.easyrsvp-field input[type="text"],
.easyrsvp-field input[type="number"],
.easyrsvp-field input,
.easyrsvp-field select,
.easyrsvp-field textarea {
    width: 100%;
    padding: var(--ersvp-space-sm) var(--ersvp-space-md);
    border: 1.5px solid var(--easyrsvp-border);
    border-radius: 10px;
    font-family: var(--easyrsvp-font-primary);
    font-size: 16px;
    background-color: #ffffff;
    color: var(--easyrsvp-text-title);
    transition: all 0.2s ease;
    appearance: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.easyrsvp-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
    padding-right: 40px !important;
}

.easyrsvp-field input[type="text"]:focus,
.easyrsvp-field input[type="number"]:focus,
.easyrsvp-field input[type="email"]:focus,
.easyrsvp-field select:focus,
.easyrsvp-field textarea:focus {
    outline: none;
    border-color: var(--easyrsvp-border-focus);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05);
}

.easyrsvp-field textarea {
    resize: vertical;
    min-height: 100px;
}

.easyrsvp-field.attendee-choice {
    margin-bottom: 0;
}

.easyrsvp-field.attendee-choice label {
    text-align: center;
    font-size: 16px;
    margin-bottom: var(--ersvp-space-sm);
}

/* Radio Cards - Enhanced */
.easyrsvp-radio-group {
    display: flex;
    gap: var(--ersvp-space-sm);
}
.easyrsvp-radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}
.easyrsvp-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}
.easyrsvp-radio-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--ersvp-space-lg) var(--ersvp-space-sm);
    border: 2px solid var(--easyrsvp-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: var(--easyrsvp-card);
    font-size: 16px;
    font-weight: 600;
    color: var(--easyrsvp-accent, #4f46e5);
    height: 100%;
}

.easyrsvp-radio-option:hover .easyrsvp-radio-card {
    border-color: var(--easyrsvp-accent);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    background-color: #fff;
}

.easyrsvp-radio-option input[type="radio"]:checked + .easyrsvp-radio-card {
    border-color: var(--easyrsvp-accent);
    background-color: var(--easyrsvp-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.15);
}

#easyrsvp-form-details {
    padding-top: var(--ersvp-space-lg);
    border-top: none; /* Removed as requested, replaced by arrow */
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: var(--ersvp-space-lg);
    position: relative;
}

/* Animated Scroll Arrow */
.easyrsvp-scroll-arrow-container {
    height: 60px;
    position: relative;
    margin: -10px 0 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.scroll-down-link {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    height: 50px;
    width: 80px;
    left: 50%;
    margin-left: -40px;
    bottom: 0;
    color: var(--easyrsvp-accent);
    text-align: center;
    text-decoration: none;
    animation: fade_move_down 2s ease-in-out infinite;
    pointer-events: auto;
}

.scroll-down-link svg {
    width: 35px;
    height: 35px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes fade_move_down {
    0%   { transform: translate(0, -15px); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: translate(0, 15px); opacity: 0; }
}

/* Submit Button */
.easyrsvp-submit-wrap {
    margin-top: var(--ersvp-space-sm);
}

.easyrsvp-standalone .easyrsvp-btn {
    width: 100%;
    padding: 16px 28px;
    background-color: var(--easyrsvp-accent);
    color: #fff !important;
    border: none !important;
    border-radius: 12px;
    font-family: var(--easyrsvp-font-primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.2) !important;
}

.easyrsvp-btn:hover {
    background-color: var(--easyrsvp-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.3) !important;
}
.easyrsvp-btn:active {
    transform: scale(0.98);
}
.easyrsvp-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Redesigned Submit Button - Premium Indigo */
#easyrsvp-submit-btn {
    width: 100%;
    padding: 18px;
    background-color: var(--easyrsvp-accent);
    color: #fff !important;
    border: none !important;
    border-radius: var(--easyrsvp-radius);
    font-family: var(--easyrsvp-font-primary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2) !important;
    position: relative;
    overflow: hidden;
}

#easyrsvp-submit-btn:hover:not(:disabled) {
    background-color: var(--easyrsvp-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3) !important;
}

#easyrsvp-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Remove legacy after/before pseudo elements */
#easyrsvp-submit-btn::after,
#easyrsvp-submit-btn::before {
    display: none !important;
}

#easyrsvp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #94a3b8;
    box-shadow: none !important;
}

/* Notices */
.easyrsvp-notice {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 15px;
    text-align: center;
    display: none;
}

.easyrsvp-notice.easyrsvp-notice-error {
    background-color: #fce8e6;
    color: var(--easyrsvp-error);
    display: block; /* When hardcoded */
}

.easyrsvp-notice.easyrsvp-notice-success {
    background-color: #e6f4ea;
    color: var(--easyrsvp-success);
    display: block;
}

/* Premium Success Card */
.easyrsvp-success-card {
    text-align: center;
    padding: 20px 10px;
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.easyrsvp-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: #e6f4ea;
    color: var(--easyrsvp-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.easyrsvp-success-icon svg {
    width: 40px;
    height: 40px;
}

.easyrsvp-success-message h2 {
    font-family: var(--easyrsvp-font-primary);
    font-weight: 800;
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--easyrsvp-accent);
}

.easyrsvp-success-message p {
    font-size: 16px;
    color: var(--easyrsvp-text-light);
    line-height: 1.6;
}

/* Calendar Buttons on Success */
.easyrsvp-calendar-actions {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid var(--easyrsvp-border);
}

.easyrsvp-calendar-actions h3 {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--easyrsvp-text-light);
}

.easyrsvp-calendar-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--ersvp-space-sm);
}

.easyrsvp-standalone .easyrsvp-calendar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: var(--ersvp-space-md);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: var(--easyrsvp-text) !important;
    border: 1px solid var(--easyrsvp-border) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
}

.easyrsvp-calendar-btn svg {
    width: 18px;
    height: 18px;
}

.easyrsvp-calendar-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    border-color: var(--easyrsvp-accent);
}

.easyrsvp-calendar-btn.google:hover { color: #4285F4; border-color: #4285F4; }
.easyrsvp-calendar-btn.outlook:hover { color: #0078D4; border-color: #0078D4; }
.easyrsvp-calendar-btn.ical:hover { color: #333333; border-color: #333333; }

/* Animated Checkmark */
.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--easyrsvp-success);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.easyrsvp-field small {
    display: block;
    margin-top: 6px;
    color: var(--easyrsvp-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ─── Premium Animated Checkbox ─── */
.easyrsvp-animated-cb-wrap { 
    display: flex; 
    align-items: center; 
    margin: 8px 0; 
}
.easyrsvp-animated-cb-label { 
    display: flex !important; 
    align-items: center; 
    cursor: pointer; 
    gap: 14px; 
    margin-bottom: 0 !important; 
    width: 100%;
}
.easyrsvp-animated-cb-input { display: none !important; }
.easyrsvp-animated-cb-box { 
    position: relative; 
    width: 30px; 
    height: 30px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background-color: #f8fafc; 
    border: 2px solid var(--easyrsvp-border); 
    border-radius: 10px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.04); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    flex-shrink: 0; 
}
.easyrsvp-animated-cb-input:checked + .easyrsvp-animated-cb-box { 
    border-color: var(--easyrsvp-accent); 
    background-color: var(--easyrsvp-accent); 
    box-shadow: 0 4px 15px rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.25); 
}
.easyrsvp-animated-cb-glint { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent); 
    opacity: 0; 
    border-radius: 8px; 
    transition: all 0.3s; 
}
.easyrsvp-animated-cb-input:checked + .easyrsvp-animated-cb-box .easyrsvp-animated-cb-glint { opacity: 1; }
.easyrsvp-animated-cb-icon { 
    width: 18px; 
    height: 18px; 
    color: #fff; 
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
    transform: scale(0.4); 
    opacity: 0; 
}
.easyrsvp-animated-cb-input:checked + .easyrsvp-animated-cb-box .easyrsvp-animated-cb-icon { 
    transform: scale(1); 
    opacity: 1; 
}
.easyrsvp-animated-cb-text { 
    color: var(--easyrsvp-text-main); 
    font-weight: 600; 
    font-size: 15px; 
    transition: color 0.3s; 
}
.easyrsvp-animated-cb-input:checked ~ .easyrsvp-animated-cb-text { 
    color: var(--easyrsvp-text-title); 
}


.easyrsvp-deadline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.1);
    color: var(--easyrsvp-accent, #4f46e5);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin: -12px -10px 0 auto; /* Right aligned, pulled up slightly and flush to right padding */
    width: fit-content;
    border: 1px solid rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.easyrsvp-deadline:hover {
    background: rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.15);
    transform: translateY(-1px);
}

.easyrsvp-deadline strong {
    margin-left: 3px;
    font-weight: 700;
}

/* Footer */
.easyrsvp-footer {
    text-align: center;
    margin-top: var(--ersvp-space-xl);
    padding-bottom: var(--ersvp-space-xl);
    font-size: 12px;
    color: #cbd5e1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .easyrsvp-container { 
        padding: var(--ersvp-space-xl) var(--ersvp-space-sm); 
        gap: var(--ersvp-space-lg);
    }
    .easyrsvp-form-wrapper { padding: var(--ersvp-space-lg) var(--ersvp-space-md); }
    .easyrsvp-header { gap: var(--ersvp-space-xs); }
}

@media (max-width: 480px) {
    .easyrsvp-radio-group { flex-direction: column; gap: 10px; }
    .easyrsvp-datetime { font-size: 15px; }
    .easyrsvp-location { font-size: 14px; }
}

/* 
 * Claim Flow & Wizard Styles
 */
.easyrsvp-claim-flow {
    background-color: #f8f9fa;
    display: block;
}

.easyrsvp-auth-container {
    padding: 20px 0;
}

.easyrsvp-auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.easyrsvp-standalone .easyrsvp-tab-btn {
    background: none !important;
    border: none !important;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: #999 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: all 0.2s;
    box-shadow: none !important;
}

.easyrsvp-tab-btn.active {
    color: var(--easyrsvp-accent);
    border-bottom: 2px solid var(--easyrsvp-accent);
}

.easyrsvp-tab-content {
    display: none;
}

.easyrsvp-tab-content.active {
    display: block;
}

/* Dashboard Enhancements */
.easyrsvp-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.easyrsvp-standalone .easyrsvp-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px;
    color: #333 !important;
    font-weight: 600;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: all 0.2s;
    box-shadow: none !important;
}

.easyrsvp-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.easyrsvp-qr-section h2 {
    font-family: var(--easyrsvp-font-secondary);
}

.card-highlight {
    border-left: 4px solid var(--easyrsvp-accent) !important;
}

.card-success {
    border-left: 4px solid var(--easyrsvp-success) !important;
}

.card-danger {
    border-left: 4px solid var(--easyrsvp-error) !important;
}

@media (max-width: 600px) {
    .easyrsvp-qr-section {
        flex-direction: column;
        text-align: center;
    }
    .easyrsvp-qr-text div {
        justify-content: center;
    }
    .easyrsvp-header-actions {
        flex-direction: column;
        width: 100%;
    }
    .easyrsvp-header-actions > * {
        width: 100%;
        justify-content: center;
    }
}

/* 
 * Global Sys Loader 
 */
.easyrsvp-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.grid-loader {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    transform: rotate(45deg);
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.cube {
    width: 30px;
    height: 30px;
    background: black;
    animation: cubeScale 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transform: scale(0);
    opacity: 0;
}

@keyframes cubeScale {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

.cube:nth-child(1) { animation-delay: 0.2s; }
.cube:nth-child(2) { animation-delay: 0.4s; }
.cube:nth-child(3) { animation-delay: 0.6s; }
.cube:nth-child(4) { animation-delay: 0.8s; }
.cube:nth-child(5) { animation-delay: 1.0s; }
.cube:nth-child(6) { animation-delay: 1.2s; }
.cube:nth-child(7) { animation-delay: 1.4s; }
.cube:nth-child(8) { animation-delay: 1.6s; }
.cube:nth-child(9) { animation-delay: 1.8s; }

/* 
 * Wizard Split-Screen & Live Preview
 */
.easyrsvp-wizard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--ersvp-bg, #f1f5f9);
    transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--ersvp-font, 'Inter', sans-serif);
}

.easyrsvp-wizard-container.preview-collapsed {
    grid-template-columns: 1fr 70px;
}

/* Mobile: single column, hide preview */
@media (max-width: 767px) {
    .easyrsvp-wizard-container {
        grid-template-columns: 1fr !important;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }
    .easyrsvp-preview-sidebar {
        display: none !important;
    }
}

/* Tablet transition point */
@media (min-width: 768px) and (max-width: 1100px) {
    .easyrsvp-wizard-container {
        grid-template-columns: 1fr;
    }
    .easyrsvp-preview-sidebar {
        display: none;
    }
}

.easyrsvp-wizard-container .claim-wrapper {
    margin: 40px auto;
    width: 90%;
    max-width: 680px;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@media (max-width: 767px) {
    .easyrsvp-wizard-container .claim-wrapper {
        margin: 0;
        width: 100%;
        max-width: 100%;
        padding: 0 0 40px;
        border-radius: 0;
        box-shadow: none;
    }
}

.easyrsvp-wizard-container.preview-collapsed .claim-wrapper {
    max-width: 900px;
}

.easyrsvp-preview-sidebar {
    background: #fff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
}

/* Expanded Content wrapper */
.easyrsvp-preview-expanded-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.easyrsvp-wizard-container.preview-collapsed .easyrsvp-preview-expanded-content {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(40px);
}

/* Collapsed Bar State */
.easyrsvp-collapsed-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0;
    flex-direction: column;
    gap: 20px;
    width: 70px;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    right: 0;
    background: #fff;
    z-index: 10;
    transform: translateX(30px);
    transition: opacity 0.35s ease 0.05s, visibility 0.35s ease 0.05s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.easyrsvp-wizard-container.preview-collapsed .easyrsvp-collapsed-bar {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-btn:hover {
    background: #f0f0f1;
    color: var(--easyrsvp-accent);
}

.device-btn-vertical {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-btn-vertical:hover {
    background: #f8fafc;
    color: var(--easyrsvp-accent);
}

.device-separator-vertical {
    width: 20px;
    height: 1px;
    background: #e2e8f0;
}

.preview-controls {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.device-toggles {
    display: flex;
    gap: 5px;
    background: #f0f0f1;
    padding: 4px;
    border-radius: 8px;
}

.device-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.device-btn:hover {
    color: var(--easyrsvp-accent);
}

.device-btn.active {
    background: #fff;
    color: var(--easyrsvp-accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.preview-url {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.preview-window {
    flex: 1;
    background: #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 40px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-window iframe {
    width: 100%;
    height: 100%;
    background: #fff;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* ============================================
 * Unified Device Frame Simulation
 * Uses .preview-screen as a "glass" wrapper 
 * with absolute pixel positioning inside the mockup
 * ============================================ */

.preview-frame-container {
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    z-index: 1;
}

.preview-frame-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    z-index: 2; /* Mockup overlay in front */
    pointer-events: none; /* Allow interaction with iframe underneath */
}

/* The "glass" area that clips the iframe */
.preview-screen {
    position: absolute;
    overflow: hidden;
    background: #fff;
    z-index: 1; /* Content behind the frame */
}

/* 
 * Critical: iframe must NOT be squashed by its parent 
 * to maintain virtual resolution before transform: scale()
 */
.preview-screen iframe {
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    transform-origin: top left;
    max-width: none !important;
    max-height: none !important;
}

/* ─── MOBILE ────────────────────────────────────────── */
.preview-window.mobile .preview-frame-container {
    width: 320px;
    height: 660px;
    border-radius: 36px;
}

.preview-window.mobile .preview-frame-container::before {
    background-image: url('../images/mobile-mockup.png');
}

.preview-window.mobile .preview-screen {
    top:  2.8%;
    left: 4.5%;
    width: 91%;
    height: 94.4%;
    border-radius: 32px;
}

.preview-window.mobile .preview-screen iframe {
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
}

/* ─── TABLET ────────────────────────────────────────── */
.preview-window.tablet .preview-frame-container {
    width: 494px;
    height: 645px;
}

.preview-window.tablet .preview-frame-container::before {
    background-image: url('../images/desktop-mockup.png');
}

.preview-window.tablet .preview-screen {
    top:  4.2%;
    left: 4.2%;
    width: 91.6%;
    height: 91.6%;
    border-radius: 16px;
}

.preview-window.tablet .preview-screen iframe {
    width: 768px !important;
    height: 1024px !important;
    min-width: 768px !important;
    transform: scale(0.589); /* (494 * 0.916) / 768 */
}

/* ─── DESKTOP (Laptop) ──────────────────────────────── */
.preview-window.desktop .preview-frame-container {
    width: 572px;
    height: 429px;
}

.preview-window.desktop .preview-frame-container::before {
    background-image: url('../images/laptop-mockup.png');
}

.preview-window.desktop .preview-screen {
    top:  6.5%;
    left: 11.5%;
    width: 77.2%;
    height: 78.5%;
    border-radius: 2px;
}

.preview-window.desktop .preview-screen iframe {
    width: 1280px !important;
    height: 1200px !important;
    min-width: 1280px !important;
    transform: scale(0.345); /* (572 * 0.772) / 1280 */
    transform-origin: top left;
}

/* ─── ZOOM CONTROLS ─────────────────────────────────── */
.device-separator {
    width: 1px;
    height: 20px;
    background: var(--easyrsvp-border);
    margin: 0 8px;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--easyrsvp-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--easyrsvp-text-light);
    transition: all 0.2s ease;
    padding: 0;
}

.zoom-btn:hover {
    background: #f8f8f8;
    color: var(--easyrsvp-accent);
}

.zoom-btn.active {
    background: var(--easyrsvp-accent);
    color: #fff;
    border-color: var(--easyrsvp-accent);
}

/* ─── ZOOM TRANSFORMS ───────────────────────────────── */
.preview-window.preview-zoomed .preview-frame-container {
    transform: scale(1.4);
    z-index: 100;
}

@media (max-width: 1400px) {
    .preview-window.preview-zoomed .preview-frame-container {
        transform: scale(1.2);
    }
}

/* ─── STYLE CUSTOMIZATION ───────────────────────────── */
.style-fab {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--easyrsvp-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.style-fab:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.style-panel {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 280px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.style-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.style-panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.style-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--easyrsvp-text);
}

.close-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--easyrsvp-text-light);
    line-height: 1;
    padding: 0;
}

.style-panel-content {
    padding: 20px;
}

.style-option {
    margin-bottom: 20px;
}

.style-option:last-child {
    margin-bottom: 0;
}

.style-option label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--easyrsvp-text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-wrap input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
}

.color-value {
    font-family: monospace;
    font-size: 14px;
    color: var(--easyrsvp-text);
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

.style-help {
    margin: 8px 0 0;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

/* --- DRAGGABLE LAYOUT SORTER --- */
.easyrsvp-sortable-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sortable-item:hover {
    border-color: var(--easyrsvp-accent);
    background: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.sortable-item.dragging {
    opacity: 0.5;
    background: #edf2f7;
    cursor: grabbing;
}

.sortable-item span {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.sortable-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.sortable-item:hover svg {
    opacity: 1;
    color: var(--easyrsvp-accent);
}

/* 
 * Elegant Animations
 */
@keyframes easyrsvpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.easyrsvp-badge,
.easyrsvp-host,
.easyrsvp-title,
.easyrsvp-datetime,
.easyrsvp-location,
.easyrsvp-message,
.easyrsvp-countdown-container,
.easyrsvp-form-wrapper,
.easyrsvp-deadline,
.easyrsvp-footer {
    animation: easyrsvpFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.easyrsvp-badge {
    animation-delay: 0.1s;
    display: inline-block;
    background-color: var(--easyrsvp-badge-bg, rgba(172, 154, 154, 0.28));
    color: var(--easyrsvp-badge-color, #475569);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Preview type — pill shape (synced across frontend & preview) */
#preview-type {
    padding-left: 19px;
    padding-right: 19px;
    padding-top: 5px;
    padding-bottom: 5px;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
}
.easyrsvp-host     { animation-delay: 0.2s; }
.easyrsvp-title    { animation-delay: 0.3s; }
.easyrsvp-datetime { animation-delay: 0.4s; }
.easyrsvp-location { animation-delay: 0.5s; }
.easyrsvp-message  { animation-delay: 0.6s; }
.easyrsvp-countdown-container { animation-delay: 0.7s; }

.easyrsvp-form-wrapper { animation-delay: 0.8s; }
.easyrsvp-deadline     { animation-delay: 1.0s; }
.easyrsvp-footer       { animation-delay: 1.2s; }

/* Countdown Styles */
.easyrsvp-countdown-container {
    margin: 0 auto;
    text-align: center;
    width: 100% !important;
    max-width: 600px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--ersvp-space-md);
    clear: both;
}

.easyrsvp-countdown-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--easyrsvp-text-muted);
    font-weight: 700;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    order: 0;
    line-height: 1;
}

.easyrsvp-countdown-timer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ersvp-space-sm);
}

.easyrsvp-countdown-timer .timer-block {
    background: var(--easyrsvp-accent, #2a323c);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 10px;
    min-width: 65px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.easyrsvp-countdown-timer .timer-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.easyrsvp-countdown-timer .timer-block label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.85;
    font-weight: 600;
}

/* Responsive Countdown Scaling for Mobile */
@media (max-width: 600px) {
    .easyrsvp-countdown-timer {
        gap: 8px;
    }
    
    .easyrsvp-countdown-timer .timer-block {
        padding: 8px 6px;
        min-width: 45px;
        border-radius: 12px;
    }
    
    .timer-block .easyrsvp-digit {
        font-size: 1.6rem;
    }
    
    .easyrsvp-countdown-timer .timer-block label {
        font-size: 8px;
        letter-spacing: 0px;
    }
}

/* Smooth button transitions */
.easyrsvp-radio-option {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}
.easyrsvp-radio-option:active {
    transform: scale(0.98);
}

/* Smooth reveal for form details */
#easyrsvp-form-details {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#easyrsvp-form-details.revealing {
    animation: easyrsvpFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Input Icons */
.easyrsvp-input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.easyrsvp-input-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #9ca3af;
    pointer-events: none;
    z-index: 2;
}

.easyrsvp-standalone input.has-icon, 
.easyrsvp-standalone select.has-icon, 
.easyrsvp-standalone textarea.has-icon {
    padding-left: 44px !important;
}

/* Premium Export Button */
.easyrsvp-btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.easyrsvp-btn-export:hover {
    background: #0f172a;
    border-color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.easyrsvp-btn-export:active {
    transform: translateY(0);
}

.easyrsvp-btn-export svg {
    opacity: 0.8;
}


/* --- STYLE OVERLAY SCREEN --- */
.easyrsvp-style-btn {
    position: absolute;
    top: 4px;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff;
    color: #111;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    z-index: 5;
}
.easyrsvp-style-btn:hover {
    border-color: #111;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Overlay sits absolutely inside .claim-wrapper, slides in from the right */
.easyrsvp-overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: var(--ersvp-surface, #fff);
    z-index: 60;
    padding: 24px;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    visibility: hidden;
    pointer-events: none;
}

.easyrsvp-overlay-screen.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.overlay-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ersvp-border, #eee);
}

.overlay-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ersvp-text);
}

.easyrsvp-close-style-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f1f5f9;
    border: 1px solid var(--ersvp-border);
    border-radius: var(--ersvp-radius-sm, 8px);
    font-size: 13px;
    font-weight: 600;
    color: var(--ersvp-muted);
    cursor: pointer;
    transition: all var(--ersvp-transition);
    flex-shrink: 0;
}

.easyrsvp-close-style-btn:hover {
    background: var(--ersvp-border);
    color: var(--ersvp-text);
}

.overlay-content {
    overflow-y: auto;
}

/* Sortable List Styling */
.easyrsvp-sortable-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px solid var(--ersvp-border);
    border-radius: var(--ersvp-radius-sm);
    cursor: grab;
    transition: all var(--ersvp-transition);
}

.sortable-item:hover {
    border-color: var(--ersvp-accent);
    background: #fff;
    box-shadow: var(--ersvp-shadow-sm);
}

.sortable-item:active {
    cursor: grabbing;
}

.sortable-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--ersvp-text);
}

.sortable-placeholder {
    height: 48px;
    background: var(--ersvp-accent-light);
    border: 2px dashed var(--ersvp-accent);
    border-radius: var(--ersvp-radius-sm);
}


/* ─── Custom Fields + Plus-One Names (Tier 4) ──────────────────────────── */
.easyrsvp-custom-fields { margin: 8px 0 4px; }
.easyrsvp-custom-field { margin-bottom: 14px; }
.easyrsvp-custom-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ersvp-text, #1e293b);
    margin-bottom: 6px;
}
.easyrsvp-custom-field input[type="text"],
.easyrsvp-custom-field textarea,
.easyrsvp-custom-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ersvp-border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.easyrsvp-custom-field input[type="text"]:focus,
.easyrsvp-custom-field textarea:focus,
.easyrsvp-custom-field select:focus {
    outline: none;
    border-color: var(--ersvp-brand-primary, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.easyrsvp-custom-field[data-type="checkbox"] .easyrsvp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--ersvp-border, #e2e8f0);
    border-radius: 10px;
}
.easyrsvp-custom-field[data-type="checkbox"] input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.easyrsvp-plus-one-names {
    margin: 8px 0 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px dashed var(--ersvp-border, #cbd5e1);
    border-radius: 10px;
}
.easyrsvp-plus-one-names label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ersvp-text, #1e293b);
    margin-bottom: 8px;
}
.easyrsvp-plus-one-name-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ersvp-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    margin-bottom: 6px;
}
.easyrsvp-plus-one-name-input:last-child { margin-bottom: 0; }
.easyrsvp-plus-one-name-input:focus {
    outline: none;
    border-color: var(--ersvp-brand-primary, #4f46e5);
}

/* ───────────────────────────────────────────────────────────────────
   Nebula-effect inputs (light theme, uses event Accent Color)
   Applied to text/email/tel/url/number inputs and textareas inside
   the public RSVP form. Selects keep matching focus styling for
   visual consistency, but skip particles.
   ─────────────────────────────────────────────────────────────────── */

/* Wrap injected by JS around plain inputs (custom fields, plus-one) */
.easyrsvp-form .nebula-fx-wrap {
    position: relative;
    display: block;
}

/* Base input/textarea polish (light theme) */
.easyrsvp-form input[type="text"],
.easyrsvp-form input[type="email"],
.easyrsvp-form input[type="tel"],
.easyrsvp-form input[type="url"],
.easyrsvp-form input[type="number"],
.easyrsvp-form textarea,
.easyrsvp-form select {
    background-color: #ffffff;
    color: var(--easyrsvp-text-main, #1e293b);
    border: 1.5px solid var(--easyrsvp-border, #e2e8f0);
    border-radius: 10px;
    transition:
        border-color 0.25s ease,
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.25s ease;
}

.easyrsvp-form input[type="text"]::placeholder,
.easyrsvp-form input[type="email"]::placeholder,
.easyrsvp-form input[type="tel"]::placeholder,
.easyrsvp-form input[type="url"]::placeholder,
.easyrsvp-form input[type="number"]::placeholder,
.easyrsvp-form textarea::placeholder {
    color: var(--easyrsvp-text-muted, #94a3b8);
    font-size: 0.9em;
}

/* Hover hint */
.easyrsvp-form input[type="text"]:hover:not(:focus),
.easyrsvp-form input[type="email"]:hover:not(:focus),
.easyrsvp-form input[type="tel"]:hover:not(:focus),
.easyrsvp-form input[type="url"]:hover:not(:focus),
.easyrsvp-form input[type="number"]:hover:not(:focus),
.easyrsvp-form textarea:hover:not(:focus),
.easyrsvp-form select:hover:not(:focus) {
    border-color: rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.45);
}

/* Nebula-style focus glow — uses event Accent Color */
.easyrsvp-form input[type="text"]:focus,
.easyrsvp-form input[type="email"]:focus,
.easyrsvp-form input[type="tel"]:focus,
.easyrsvp-form input[type="url"]:focus,
.easyrsvp-form input[type="number"]:focus,
.easyrsvp-form textarea:focus,
.easyrsvp-form select:focus {
    outline: none;
    border-color: var(--easyrsvp-accent, #4f46e5);
    background-color: #ffffff;
    box-shadow:
        0  5px  8px rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.22),
        0 10px 20px rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.14),
        0 15px 40px rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.10),
        0 20px 60px rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.06);
}

/* Custom select chevron tinted with accent (consistency with focus) */
.easyrsvp-form select,
#easyrsvp_guests_count {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 14px !important;
    padding-right: 40px !important;
    background-color: #ffffff !important;
}
.easyrsvp-form select:focus,
#easyrsvp_guests_count:focus {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-color: #ffffff !important;
}

/* ── Particles ── */
.nebula-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    top: 50%;
    left: 18px;
    filter: blur(0.7px);
    mix-blend-mode: multiply;
    background: var(--easyrsvp-accent, #4f46e5);
    transform: translate(0, -50%) scale(0.8);
    will-change: transform, opacity;
}

/* Trigger animation when input/textarea inside the same wrap is focused */
.easyrsvp-form .easyrsvp-input-icon-wrap input:focus ~ .nebula-particle,
.easyrsvp-form .easyrsvp-input-icon-wrap textarea:focus ~ .nebula-particle,
.easyrsvp-form .nebula-fx-wrap input:focus ~ .nebula-particle,
.easyrsvp-form .nebula-fx-wrap textarea:focus ~ .nebula-particle {
    animation: nebula-float 2s var(--delay, 0s) forwards ease-out;
}

@keyframes nebula-float {
    0% {
        transform: translate(0, -50%) scale(0.8);
        opacity: 0;
        background: var(--easyrsvp-accent, #4f46e5);
    }
    20% {
        opacity: 0.85;
    }
    100% {
        transform:
            translate(calc(var(--x) * 140px), calc(var(--y) * 35px - 50%))
            scale(1.15);
        opacity: 0;
        background: rgba(var(--easyrsvp-accent-rgb, 79, 70, 229), 0.4);
    }
}

/* Ensure plain .easyrsvp-field acts as positioning ctx for particles
   in case JS wraps fall back (defensive) */
.easyrsvp-form .easyrsvp-field { position: relative; }

/* Reduced motion: disable particle animation */
@media (prefers-reduced-motion: reduce) {
    .easyrsvp-form .easyrsvp-input-icon-wrap input:focus ~ .nebula-particle,
    .easyrsvp-form .easyrsvp-input-icon-wrap textarea:focus ~ .nebula-particle,
    .easyrsvp-form .nebula-fx-wrap input:focus ~ .nebula-particle,
    .easyrsvp-form .nebula-fx-wrap textarea:focus ~ .nebula-particle {
        animation: none;
    }
}
