#rsvp-pro-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.rsvp-pro-header {
    text-align: center;
    margin-bottom: 30px;
}

.rsvp-pro-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.rsvp-pro-header p {
    color: #666;
    font-size: 1.1em;
}

.rsvp-form-step {
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 120ms ease;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    transform: translateY(-1px);
}

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

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: #0073aa;
    background-color: #f8f9fa;
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.radio-label span {
    font-size: 1.1em;
    color: #333;
}

.form-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.form-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3em;
}

.form-section p {
    margin: 0 0 20px 0;
    color: #666;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.rsvp-button {
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: transform 120ms ease, box-shadow 200ms ease, background 220ms ease;
    min-width: 150px;
}

.rsvp-button-primary {
    background-color: #0073aa;
    color: white;
}

.rsvp-button-primary:hover {
    background-color: #005a87;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.rsvp-button-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 2px solid #ddd;
}

.rsvp-button-secondary:hover {
    background-color: #e1e1e1;
    border-color: #bbb;
    transform: translateY(-1px);
}

/* Progress bar */
.rsvp-progress { position: relative; height: 4px; background: #eef3f7; border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.rsvp-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #0073aa, #00bcd4); transition: width 400ms ease; }

.guest-info-card {
    background: #e8f4fd;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.guest-info-card h3 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 1.4em;
}

.guest-info-card .guest-details {
    color: #333;
    font-size: 1.1em;
}

.family-member-rsvp {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
}

.family-member-rsvp h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.rsvp-success-message {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: 8px;
    border: 2px solid #28a745;
}

.rsvp-success-message h3 {
    color: #155724;
    font-size: 2em;
    margin: 0 0 15px 0;
}

.rsvp-success-message p {
    color: #155724;
    font-size: 1.2em;
    margin: 0;
}

/* Animated checkmark */
.rsvp-checkmark { width: 64px; height: 64px; margin: 0 auto 12px auto; }
.rsvp-checkmark svg { width: 64px; height: 64px; stroke: #28a745; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.rsvp-checkmark__check { stroke-dasharray: 48; stroke-dashoffset: 48; animation: rsvpDraw 600ms ease forwards 100ms; }
@keyframes rsvpDraw { to { stroke-dashoffset: 0; } }

.rsvp-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border: 2px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 1.1em;
}

.rsvp-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rsvp-loading p {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

/* Elementor Widget Specific Styles */
.rsvp-pro-elementor-widget {
    width: 100%;
}

.rsvp-pro-elementor-widget #rsvp-pro-form-container {
    margin: 0;
}

.elementor-widget-rsvp-pro-form .rsvp-pro-header {
    text-align: inherit;
}

.elementor-widget-rsvp-pro-form .form-actions {
    justify-content: space-between;
}

.elementor-widget-rsvp-pro-form .form-actions .rsvp-button {
    margin: 5px;
}

/* Elementor Editor Specific Styles */
.elementor-editor-active .rsvp-pro-elementor-widget {
    min-height: 200px;
}

/* Autocomplete Styles */
.rsvp-autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease;
}
.rsvp-autocomplete-container.is-visible { opacity: 1; transform: translateY(0); }

.rsvp-autocomplete-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.rsvp-autocomplete-item:hover,
.rsvp-autocomplete-item.active {
    background-color: #f8f9fa;
}

.rsvp-autocomplete-item:last-child {
    border-bottom: none;
}

.rsvp-autocomplete-item .guest-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 4px;
}

.rsvp-autocomplete-item .guest-details {
    color: #666;
    font-size: 0.9em;
}

.rsvp-autocomplete-loading {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.rsvp-autocomplete-error {
    padding: 15px;
    text-align: center;
    color: #721c24;
    background: #f8d7da;
    border-top: 1px solid #f5c6cb;
}

.rsvp-autocomplete-no-results {
    padding: 15px;
    text-align: center;
    color: #856404;
    background: #fff3cd;
    border-top: 1px solid #ffeaa7;
    font-style: italic;
}

.form-field {
    position: relative;
}

.form-field input.guest-selected {
    border-color: #28a745;
    background-color: #d4edda;
}

.rsvp-button-success {
    background-color: #28a745;
    color: white;
}

.rsvp-button-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Modal Styles */
.rsvp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.rsvp-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.rsvp-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.rsvp-modal-close:hover {
    color: #333;
    background-color: #f1f1f1;
}

.rsvp-modal-body {
    padding: 0;
}

.rsvp-modal-body #rsvp-pro-form-container {
    margin: 0;
    max-width: none;
    box-shadow: none;
}

body.rsvp-modal-open {
    overflow: hidden;
}

/* Trigger Button Styles */
.rsvp-trigger-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.2);
}

.rsvp-trigger-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.3);
    color: white;
    text-decoration: none;
}

.rsvp-trigger-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 115, 170, 0.2);
}

/* Enhanced Form Animations */
.rsvp-form-step {
    animation: fadeInSlide 0.4s ease-out;
}

/* Additional step animations */
.rsvp-step-active { animation: rsvpSlideIn 420ms cubic-bezier(.25,.8,.25,1); }
.rsvp-step-exit-left { animation: rsvpSlideOutLeft 300ms ease forwards; }
.rsvp-step-exit-right { animation: rsvpSlideOutRight 300ms ease forwards; }
@keyframes rsvpSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rsvpSlideOutLeft { to { opacity: 0; transform: translateX(-20px); } }
@keyframes rsvpSlideOutRight { to { opacity: 0; transform: translateX(20px); } }

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Error and Loading States */
.rsvp-error-message {
    animation: shakeIn 0.5s ease-out;
}

@keyframes shakeIn {
    0% { transform: translateX(-10px); opacity: 0; }
    25% { transform: translateX(10px); opacity: 0.5; }
    50% { transform: translateX(-5px); opacity: 0.75; }
    100% { transform: translateX(0); opacity: 1; }
}

.rsvp-loading .spinner {
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
    #rsvp-pro-form-container {
        padding: 15px;
    }
    
    .rsvp-form-step {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .rsvp-button {
        width: 100%;
        min-width: auto;
    }
    
    .radio-group {
        gap: 8px;
    }
    
    .radio-label {
        padding: 10px;
    }
    
    .rsvp-pro-elementor-widget .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .elementor-widget-rsvp-pro-form .form-actions .rsvp-button {
        margin: 5px 0;
        width: 100%;
    }
    
    /* Mobile Modal Adjustments */
    .rsvp-modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .rsvp-modal-content {
        max-height: calc(100vh - 40px);
        border-radius: 8px;
    }
    
    .rsvp-autocomplete-container {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        max-height: 250px;
    }
    
    .rsvp-trigger-button {
        width: 100%;
        padding: 18px 20px;
    }
}
