.user-registration-container {
    max-width: 800px;
    margin: 20px auto;
    background: #e6f3ff;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#user-registration-form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-group input:disabled,
.form-group select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.status-message {
    margin-top: 5px;
    font-size: 12px;
    font-weight: bold;
    min-height: 16px;
}

.status-message.available {
    color: #28a745 !important;
    font-weight: bold !important;
}

.status-message.not-available {
    color: #dc3545 !important;
    font-weight: bold !important;
}

.status-message.match {
    color: #28a745 !important;
    font-weight: bold !important;
}

.status-message.no-match {
    color: #dc3545 !important;
    font-weight: bold !important;
}

#submit-btn {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

#submit-btn:hover:not(:disabled) {
    background: #007bff;
    transform: translateY(-2px);
}

#submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

#submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

input[type="file"] {
    padding: 8px !important;
    border: 2px dashed #000 !important;
    background: #f8f9fa !important;
}

input[type="file"]:focus {
    border-color: #007bff !important;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .user-registration-container {
        margin: 10px;
        padding: 20px;
        border-radius: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    #user-registration-form h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 16px;
    }
    
    #submit-btn {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .user-registration-container {
        margin: 5px;
        padding: 15px;
    }
    
    #user-registration-form h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px;
    }
    
    #submit-btn {
        padding: 10px;
    }
}

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
}

 /* Corrected CSS for 50% width select boxes */

/* Ensure form rows use flexbox for 50/50 split */
.user-registration-container .form-row {
    display: flex !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
}

/* Each form group takes exactly 50% of row width */
.user-registration-container .form-row .form-group {
    flex: 1 1 50% !important;
    min-width: 0 !important;
    max-width: calc(50% - 10px) !important;
    box-sizing: border-box !important;
}

/* Select boxes take full width of their 50% container */
.user-registration-container select {
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 12px 40px 12px 15px; /* Extra right padding for arrow */
    border: 2px solid #333;
    border-radius: 8px;
    background-color: #e6f3ff;
    color: #333;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
    line-height: 1.5; /* Ensures proper vertical alignment */
    height: 48px; /* Fixed height for consistency */
    min-height: 48px; /* Minimum height */
    
    /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Custom arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hover state */
.user-registration-container select:hover {
    border-color: #667eea;
    background-color: #f0f8ff;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.2);
}

/* Focus state */
.user-registration-container select:focus {
    outline: none;
    border-color: #667eea;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Specific styling for cascading dropdowns */
.user-registration-container select[name="country_id"],
.user-registration-container select[name="state_id"],
.user-registration-container select[name="city_id"],
.user-registration-container select[name="estate_id"] {
    height: 50px; /* Slightly taller for location dropdowns */
    padding: 14px 45px 14px 15px;
    width: 100% !important;
    max-width: 100% !important;
}

/* Gender dropdown styling */
.user-registration-container select[name="gender_id"] {
    height: 48px;
    padding: 12px 40px 12px 15px;
    width: 100% !important;
    max-width: 100% !important;
}

/* Disabled select styling */
.user-registration-container select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%236c757d" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
}

/* Option styling within select */
.user-registration-container select option {
    padding: 10px;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
}

/* Alternative arrow styles (you can choose one) */
/* Option 1: Simple down arrow */
.user-registration-container select.arrow-simple {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 14 8"><path fill="%23333" d="M1 1l6 6 6-6"/></svg>');
}

/* Option 2: Rounded arrow */
.user-registration-container select.arrow-rounded {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="7" viewBox="0 0 12 7"><path fill="%23333" d="M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z"/></svg>');
}

/* Option 3: Chevron style arrow */
.user-registration-container select.arrow-chevron {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="10" viewBox="0 0 16 10"><path fill="%23333" d="M8 10L0 2l1.5-1.5L8 7l6.5-6.5L16 2z"/></svg>');
}

/* Mobile responsiveness - stack on small screens */
@media (max-width: 768px) {
    .user-registration-container .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .user-registration-container .form-row .form-group {
        flex: none !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .afrisoft-user-form select {
        height: 50px; /* Slightly taller on mobile for better touch */
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 40px 14px 15px;
    }
}

/* Loading state for cascading dropdowns */
.afrisoft-user-form select.loading {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 50 50"><path fill="%23333" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"><animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/></path></svg>');
    background-size: 20px;
    background-position: right 15px center;
}

/* Error state styling */
.afrisoft-user-form select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Success state styling */
.afrisoft-user-form select.success {
    border-color: #28a745;
    background-color: #f0fff4;
}

/* Form group styling for better spacing */
.afrisoft-user-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Label styling to work with taller selects */
.afrisoft-user-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.status-message {
    margin-top: 5px;
    font-size: 12px;
    font-weight: bold;
    min-height: 16px;
}

.status-message.available {
    color: #28a745 !important; /* Green for available */
    font-weight: bold !important;
}

.status-message.not-available {
    color: #dc3545 !important; /* Bold red for not available */
    font-weight: bold !important;
}

.status-message.match {
    color: #28a745 !important; /* Green bold */
    font-weight: bold !important;
}

.status-message.no-match {
    color: #dc3545 !important; /* Bold red */
    font-weight: bold !important;
}

#submit-btn {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

#submit-btn:hover:not(:disabled) {
    background: #007bff; /* Blue on hover */
    transform: translateY(-2px);
}

#submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

#submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* File input styling */
input[type="file"] {
    padding: 8px !important;
    border: 2px dashed #000 !important;
    background: #f8f9fa !important;
}

input[type="file"]:focus {
    border-color: #007bff !important;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .user-registration-container {
        margin: 10px;
        padding: 20px;
        border-radius: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    #user-registration-form h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #submit-btn {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .user-registration-container {
        margin: 5px;
        padding: 15px;
    }
    
    #user-registration-form h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px;
    }
    
    #submit-btn {
        padding: 10px;
    }
}

/* Success/Error messages */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form validation indicators */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* Progress indicator */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for better accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .user-registration-container {
        border-width: 3px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 3px;
    }
    
    #submit-btn {
        border: 3px solid #000;
    }
}

/* ADD THIS CSS TO YOUR assets/style.css FILE */

/* Force select boxes to take full width of their container (50% of row) */
.form-group select {
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

/* Ensure form-group containers take exactly 50% */
.form-row .form-group {
    flex: 1 1 50% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Specific fix for select elements in form rows */
#gender_id,
#country_id, 
#state_id,
#city_id,
#estate_id {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
}