/* Main Container */
.mfp-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
}

/* Progress Indicator - Similar to Resi */
.mfp-progress-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.mfp-progress-step {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.mfp-progress-step.active {
    color: #2370e4;
}

.mfp-progress-step .step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 600;
}

.mfp-progress-step.active .step-number {
    background: #2370e4;
    color: white;
}

/* Form Container */
.mfp-form-wrapper {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

/* Form Header */
.mfp-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.mfp-form-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.mfp-form-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Form Groups - Resi Style */
.mfp-form-group {
    margin-bottom: 30px;
}

.mfp-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

/* Popup Triggers - Resi Style */
.mfp-popup-trigger {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 56px;
    box-sizing: border-box;
}

.mfp-popup-trigger:hover {
    border-color: #b3b3b3;
}

.mfp-popup-trigger.active {
    border-color: #2370e4;
    background-color: #f8fafd;
}

.mfp-selected-value {
    color: #333;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfp-selected-value:not(:has(img)) {
    color: #999;
}

.mfp-dropdown-icon {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mfp-popup-trigger.active .mfp-dropdown-icon {
    transform: rotate(180deg);
    color: #2370e4;
}

/* Button - Resi Style */
.mfp-next-btn,
.mfp-prev-btn,
.mfp-submit-btn {
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: 10px;
}

.mfp-next-btn {
    background: #2370e4;
    color: white;
}

.mfp-next-btn:hover:not(:disabled) {
    background: #1c5bb8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 112, 228, 0.2);
}

.mfp-next-btn:disabled {
    background: #e7e7e7;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.mfp-prev-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e7e7e7;
}

.mfp-prev-btn:hover {
    background: #ededed;
}

.mfp-submit-btn {
    background: #2370e4;
    color: white;
}

.mfp-submit-btn:hover:not(:disabled) {
    background: #1c5bb8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 112, 228, 0.2);
}

/* Form Actions */
.mfp-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e7e7e7;
}

/* Summary - Resi Style */
.mfp-form-summary {
    background: #f8fafd;
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
    border: 1px solid #e7e7e7;
}

.mfp-form-summary h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.mfp-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e7e7e7;
}

.mfp-summary-item:last-child {
    border-bottom: none;
}

.mfp-summary-label {
    color: #666;
    font-size: 15px;
}

.mfp-summary-value {
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

/* Success Message - Resi Style */
.mfp-success-message {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease;
}

.mfp-success-content h3 {
    color: #2370e4;
    font-size: 28px;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.mfp-success-content p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.mfp-reset-btn {
    background: #2370e4;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mfp-reset-btn:hover {
    background: #1c5bb8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 112, 228, 0.2);
}

/* Centered Modal Overlay */
.mfp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.mfp-modal-overlay.active {
    display: flex;
}

/* Centered Modal Container */
.mfp-modal-centered {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Header */
.mfp-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.mfp-modal-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
}

.mfp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.mfp-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Modal Content */
.mfp-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 40px;
}

/* Modal Options - Resi Style */
.mfp-modal-option {
    padding: 20px;
    margin-bottom: 12px;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
}

.mfp-modal-option:hover {
    border-color: #b3b3b3;
    background: #f8fafd;
}

.mfp-modal-option.selected {
    border-color: #2370e4;
    background: #f0f7ff;
}

.mfp-option-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f5f5f5;
    font-size: 20px;
}

.mfp-modal-option.selected .mfp-option-icon {
    background: #2370e4;
    color: white;
}

.mfp-option-content {
    flex: 1;
}

.mfp-option-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
}

.mfp-modal-option.selected .mfp-option-title {
    color: #2370e4;
}

.mfp-option-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Form Inputs - Step 2 */
.mfp-form-group input[type="text"],
.mfp-form-group input[type="email"],
.mfp-form-group input[type="tel"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: white;
}

.mfp-form-group input:focus {
    outline: none;
    border-color: #2370e4;
    background: #f8fafd;
}

.mfp-form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

/* Loading State */
.mfp-submit-btn.loading {
    position: relative;
    color: transparent;
}

.mfp-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from { transform: rotate(0turn); }
    to { transform: rotate(1turn); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mfp-form-container {
        padding: 0 16px;
        margin: 20px auto;
    }
    
    .mfp-form-wrapper {
        padding: 24px;
    }
    
    .mfp-form-header h2 {
        font-size: 24px;
    }
    
    .mfp-form-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .mfp-modal-option {
        padding: 16px;
    }
    
    .mfp-modal-centered {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .mfp-form-wrapper {
        padding: 20px;
    }
    
    .mfp-form-header h2 {
        font-size: 22px;
    }
    
    .mfp-form-header p {
        font-size: 15px;
    }
    
    .mfp-modal-header {
        padding: 20px;
    }
    
    .mfp-modal-header h3 {
        font-size: 18px;
    }
    
    .mfp-modal-content {
        padding: 16px;
    }
    
    /* Mobile-specific modal adjustments */
    .mfp-modal-centered {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
    }
    
    .mfp-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
}


.mfp-step-1,
.mfp-step-2,
.mfp-success-message {
    display: none;
}

.mfp-step-1.active,
.mfp-step-2.active,
.mfp-success-message.active {
    display: block;
    animation: fadeIn 0.5s ease;
}