/* Form Container Styles */
.row {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
}

/* Form Field Container */
.col-sm-4, .col-sm-8 {
    position: relative;
    padding: 0;
}

.col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-sm-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

/* Form Labels */
.control-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 2;
    pointer-events: none;
}

.select-label {
    pointer-events: none !important;
    z-index: 1 !important;
}

.textarea-label {
    top: 25px;
    transform: none;
}

/* Form Inputs and Selects */
.field {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.field.unselected {
    color: #999;
}

/* Select Specific Styles */
select.field {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: none;
}

/* Textarea Specific Styles */
textarea.field {
    min-height: 120px;
    resize: vertical;
    padding-top: 15px;
    line-height: 1.5;
}

/* Error States */
.error .field {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.error .field:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.error_container {
    background-color: #fff8f8;
    border-radius: 4px;
}

.errordesignfields {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

/* Not Empty Field State */
.not-empty-field .field {
    border-color: #28a745;
    background-color: #f8fff9;
}

/* Icons */
.fa, .fas {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Security Question Row */
.question-row {
    background-size: 3px 100%;
    padding: 15px 0;
    margin-top: 10px;
    border-radius: 4px;
}

/* Error Messages */
.col-sm-4 > [class*="error"],
.col-sm-8 > [class*="error"] {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Placeholder Styling */
::placeholder {
    color: #999;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #999;
}

::-ms-input-placeholder {
    color: #999;
}

/* Focus States for Accessibility */
.field:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 2048px) {
    .col-sm-4, .col-sm-8 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .row {
        margin-bottom: 10px;
    }
    
    .control-label {
        left: 12px;
    }
    
    .field {
        padding-left: 40px;
    }
}

/* Hover States */
.field:hover:not(:focus) {
    border-color: #bbb;
}

/* Required Field Indicators */
.field[required] {
    background-image: none;
}

/* Security Question Input */
#answer {
    margin-top: 10px;
}

/* Remove default number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}