.erf-registration-form {
    margin: 0 auto;
    font-family: inherit;
}

.erf-form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.erf-form-group {
    margin-bottom: 0;
    box-sizing: border-box;
}

/* Column width classes - FIXED */
.erf-form-group.erf-col-10 {
    width: calc(10% - 13.5px);
}

.erf-form-group.erf-col-20 {
    width: calc(20% - 12px);
}

.erf-form-group.erf-col-30 {
    width: calc(30% - 10.5px);
}

.erf-form-group.erf-col-33 {
    width: calc(33.333% - 10px);
}

.erf-form-group.erf-col-40 {
    width: calc(40% - 9px);
}

.erf-form-group.erf-col-50 {
    width: calc(50% - 7.5px);
}

.erf-form-group.erf-col-60 {
    width: calc(60% - 6px);
}

.erf-form-group.erf-col-66 {
    width: calc(66.666% - 5px);
}

.erf-form-group.erf-col-70 {
    width: calc(70% - 4.5px);
}

.erf-form-group.erf-col-80 {
    width: calc(80% - 3px);
}

.erf-form-group.erf-col-90 {
    width: calc(90% - 1.5px);
}

.erf-form-group.erf-col-100 {
    width: 100%;
}

.erf-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.erf-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.erf-form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Error state for fields */
.erf-form-control.erf-error {
    border-color: #f44336 !important;
    background-color: #fff5f5;
}

/* Field-level error messages */
.erf-field-error {
    display: block;
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #ffebee;
    border-left: 3px solid #f44336;
    border-radius: 3px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password strength indicator */
.erf-password-strength {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
}

.erf-strength-item {
    padding: 3px 0;
    transition: all 0.3s ease;
}

.erf-strength-item.valid {
    color: #4CAF50;
    font-weight: 600;
}

.erf-strength-item.invalid {
    color: #999;
    font-weight: 400;
}

/* Password match indicator */
.erf-password-match {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 3px;
}

.erf-password-match.valid {
    color: #4CAF50;
    background-color: #e8f5e9;
    border-left: 3px solid #4CAF50;
}

.erf-password-match.invalid {
    color: #f44336;
    background-color: #ffebee;
    border-left: 3px solid #f44336;
}

.erf-password-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.erf-submit-btn {
    width: 100%;
    padding: 12px 30px;
    /* Background and colors controlled by Elementor widget */
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.erf-submit-btn:hover {
    transform: translateY(-2px);
    /* Shadow controlled by Elementor widget */
}

.erf-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form messages */
.erf-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.erf-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.erf-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Email verification notice */
.erf-verification-notice {
    padding: 15px 20px;
    margin-bottom: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeIn 0.5s ease;
}

.erf-verification-notice:last-child {
    margin-top: 20px;
    margin-bottom: 0;
}

/* Button icon wrappers */
.erf-submit-btn .erf-btn-icon-left,
.erf-btn-next .erf-btn-icon-left,
.erf-btn-prev .erf-btn-icon-left,
.erf-submit-btn .erf-btn-icon-right,
.erf-btn-next .erf-btn-icon-right,
.erf-btn-prev .erf-btn-icon-right {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

/* Target ALL icons inside wrappers - Font Awesome */
.erf-submit-btn .erf-btn-icon-left i,
.erf-btn-next .erf-btn-icon-left i,
.erf-btn-prev .erf-btn-icon-left i,
.erf-submit-btn .erf-btn-icon-right i,
.erf-btn-next .erf-btn-icon-right i,
.erf-btn-prev .erf-btn-icon-right i {
    font-size: 16px !important; /* Default - overridden by widget */
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
}

/* Target ALL SVG icons inside wrappers */
.erf-submit-btn .erf-btn-icon-left svg,
.erf-btn-next .erf-btn-icon-left svg,
.erf-btn-prev .erf-btn-icon-left svg,
.erf-submit-btn .erf-btn-icon-right svg,
.erf-btn-next .erf-btn-icon-right svg,
.erf-btn-prev .erf-btn-icon-right svg {
    width: 16px !important; /* Default - overridden by widget */
    height: 16px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    display: block !important;
}

.erf-submit-btn,
.erf-btn-next,
.erf-btn-prev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Custom Fields Styling */
.erf-checkbox-item,
.erf-radio-item {
    padding: 8px 0;
}

.erf-checkbox-item label,
.erf-radio-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
}

.erf-checkbox-item input[type="checkbox"],
.erf-radio-item input[type="radio"] {
    margin-right: 10px;
    width: auto;
    height: auto;
    cursor: pointer;
}

.erf-html-content {
    padding: 10px 0;
    line-height: 1.6;
}

textarea.erf-form-control {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

select.erf-form-control {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" 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');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

input[type="date"].erf-form-control,
input[type="time"].erf-form-control {
    cursor: pointer;
}

/* File Upload Styling */
input[type="file"].erf-form-control {
    padding: 10px;
    height: auto;
    line-height: 1.5;
}

.erf-file-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Multi-Step Form Styling */
.erf-multistep-wrapper {
    width: 100%;
}

.erf-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.erf-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.erf-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0.6;
    transition: all 0.3s;
    font-size: 13px;
    background: #fff;
    padding: 0 5px;
}

.erf-progress-step.active {
    opacity: 1;
    font-weight: 600;
}

.erf-progress-step span {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: bold;
    margin: 0 auto 10px;
    transition: all 0.3s;
    position: relative;
    z-index: 3;
}

.erf-progress-step.active span {
    background: #667eea;
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.erf-progress-step .erf-step-title {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    line-height: 1.3;
}

.erf-progress-step.active .erf-step-title {
    color: #667eea;
    font-weight: 600;
}

.erf-step {
    display: none;
    width: 100%;
}

.erf-step.active {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.erf-step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.erf-btn-prev,
.erf-btn-next {
    flex: 1;
    padding: 12px 30px;
    /* Border, background, and colors controlled by Elementor widget */
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.erf-btn-prev:hover,
.erf-btn-next:hover {
    transform: translateY(-2px);
    /* Background, colors, and shadow controlled by Elementor widget */
}

.erf-btn-prev:disabled,
.erf-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.erf-multistep-form .erf-submit-btn {
    flex: 2;
    /* Ensure all widget styling is applied */
}

/* Make sure multi-step navigation is flex container */
.erf-step-navigation {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Loading Overlay */
.erf-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.erf-loader {
    text-align: center;
    background: #fff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

.erf-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.erf-loading-message {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

.erf-loading-message strong {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    color: #667eea;
}

/* Success Screen Styling */
.erf-success-screen {
    text-align: center;
    padding: 60px 40px;
    animation: fadeInSuccess 0.5s ease;
}

@keyframes fadeInSuccess {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.erf-success-icon {
    font-size: 80px;
    color: #4CAF50;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.erf-success-icon i,
.erf-success-icon svg {
    display: inline-block;
    width: 80px;
    height: 80px;
}

.erf-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.erf-success-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 30px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.erf-success-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.erf-success-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    background: none;
    font-family: inherit;
}

.erf-success-btn-primary {
    background: #667eea;
    color: #fff !important;
    border-color: #667eea;
}

.erf-success-btn-primary:hover {
    background: #5568d3;
    border-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff !important;
}

.erf-success-btn-secondary {
    background: transparent;
    color: #667eea !important;
    border-color: #667eea;
}

.erf-success-btn-secondary:hover {
    background: #667eea;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* New Registration button specific styling */
.erf-new-registration-btn {
    margin-top: 10px;
}

/* Hide form when success screen is shown */
.erf-registration-form.show-success .erf-form,
.erf-registration-form.show-success .erf-progress-bar {
    display: none;
}

.erf-registration-form.show-success .erf-success-screen {
    display: block !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .erf-form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .erf-submit-btn {
        font-size: 14px;
    }
    
    /* Stack all columns on mobile */
    .erf-form-group.erf-col-10,
    .erf-form-group.erf-col-20,
    .erf-form-group.erf-col-30,
    .erf-form-group.erf-col-33,
    .erf-form-group.erf-col-40,
    .erf-form-group.erf-col-50,
    .erf-form-group.erf-col-60,
    .erf-form-group.erf-col-66,
    .erf-form-group.erf-col-70,
    .erf-form-group.erf-col-80,
    .erf-form-group.erf-col-90 {
        width: 100% !important;
    }
    
    .erf-form {
        gap: 0;
    }
    
    .erf-form-group {
        margin-bottom: 20px;
    }
    
    /* Multi-step progress bar on mobile */
    .erf-progress-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .erf-progress-bar::before {
        display: none;
    }
    
    .erf-step-navigation {
        flex-direction: column;
    }
    
    .erf-btn-prev,
    .erf-btn-next {
        width: 100%;
    }
}

/* Animation for form appearance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.erf-registration-form {
    animation: fadeIn 0.5s ease;
}

/* WYSIWYG Editor Support for Email Templates */
.erf-email-template {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.erf-email-template h1,
.erf-email-template h2,
.erf-email-template h3 {
    margin-top: 0;
}

.erf-email-template p {
    margin: 10px 0;
}

.erf-email-template a {
    color: #667eea;
    text-decoration: none;
}

.erf-email-template a:hover {
    text-decoration: underline;
}