.m-form-box {
    max-width: 500px;
}

/* Prevent error message from pushing form input icon */
.position-relative {
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"] {
    background: #F6F6F6;
    border: 2px solid transparent;
    padding: 10px;
    border-radius: 12px;
    font-size: 16px;
    width: 100%;
    height: 45px;
    transition: all 0.3s ease-in-out;
}

textarea,
select {
    border: 2px solid transparent !important;
    background: #F6F6F6 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    transition: all 0.3s ease-in-out !important;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus {
    background: #fff;
    border-color: #3f3f3f;
}

textarea:focus,
select:focus {
    background: #fff !important;
    border-color: #3f3f3f !important;
}

input[type="email"]:hover,
input[type="password"]:hover,
input[type="text"]:hover,
input[type="tel"]:hover {
    border-color: #3f3f3f;
}

textarea:hover,
select:hover {
    border-color: #3f3f3f !important;
}

input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    box-shadow: none !important;
}

input::placeholder,
textarea::placeholder {
    color: #9D9D9D !important;
}

/* Keep icon properly positioned */
.form-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.text-area .form-input-icon {
    top: 20px;
}

/* Keep password icon aligned */
.password-field-icon {
    position: absolute;
    font-size: 14px;
    font-weight: 300;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #ababab;
}

/* Dropdown Container */
.custom-dropdown {
    position: relative;
    width: 100%;
}

/* Dropdown Header */
.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid transparent;
    background: #F6F6F6 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    transition: all 0.3s ease-in-out !important;
    padding: 10px 10px 10px 0px;
    cursor: pointer;
    position: relative;
}

/* Chevron Icon */
#chevron-icon {
    transition: transform 0.3s ease-in-out;
    color: #262626;
    font-size: 14px;
}

/* Rotate icon when active */
.custom-dropdown.active #chevron-icon {
    transform: rotate(180deg);
}

/* Dropdown List */
.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    list-style: none;
    padding: 0;
    margin: 5px 0 0;
    display: none;
    z-index: 10;
}

.select-text{
    width: 100%;
    text-wrap: auto;
}

.dropdown-list.active {
    display: block;
    /* Show when active */
}

/* Show dropdown */
.custom-dropdown.active .dropdown-list {
    display: block;
}

/* Dropdown Item */
.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

/* Hover effect */
.dropdown-item:hover {
    background-color: #f0f0f0;
    border-radius: 12px;
}

/* Selected Item */
.dropdown-item.selected {
    background-color: #f0f0f0;
    border-radius: 12px;
}

.dropdown-item.disabled {
    color: #999;
    pointer-events: none;
    /* Prevent clicking */
    font-weight: 500;
}

/* Container to hold checkbox & error message */
.custom-checkbox-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Checkbox and label aligned properly */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Custom styling for the checkbox */
.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    border: 2px solid #ABABAB;
    border-radius: 4px;
    position: relative;
    font-family: "Font Awesome 5 Free";
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    flex-shrink: 0;
    margin-top: 3px;
}

/* Custom checkbox checkmark */
.custom-checkbox input[type="checkbox"]::before {
    font-size: 12px;
    content: "✔";
    color: white;
    display: none;
}

.custom-checkbox input[type="checkbox"]:checked {
    background-color: #3f3f3f;
    border-color: #3f3f3f;
    content: "✔";
}

.custom-checkbox input[type="checkbox"]:checked::before {
    display: flex;
    content: "✔";
    color: white;
}

/* Label styles */
.custom-checkbox label {
    color: rgba(33, 37, 41, 0.75);
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    line-height: 1.5;
}

.forgot-password:hover {
    color: #262626 !important;
}

.custom-redirect {
    transition: 0.3s ease-in-out;
}

.custom-redirect:hover {
    color: #262626;
    transition: 0.3s ease-in-out;
}

/* OR Divider */
.or-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #bbb;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    max-width: 500px;
    margin: 0px auto;
    /* Adds spacing */
}

.or-divider::before,
.or-divider::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background-color: #ddd;
    margin: 0 15px;
}


.google-login-btn:hover {
    background-color: #F6F6F6;
    transition: 0.3s ease-in-out;
}

.google-login-btn:active {
    background: #F1F1F1 !important;
}

.recaptcha-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.submit-btn {
    font-size: 20px;
    transition: 0.3s ease-in-out;
    border-radius: 12px;
}

.submit-btn:active {
    color: #ffffff !important;
    transform: scale(0.98);
    transition: transform 0.1s ease-in-out;
}

.iti {
    width: 100%;
}

.iti--separate-dial-code .iti__selected-flag {
    padding-left: 40px !important;
    background: none !important;
}

.iti__flag {
    display: none;
}

.is-invalid {
    border-color: #dc3545 !important;
    background: #ffebee !important;
}

.is-valid,
.is-invalid {
    box-shadow: none !important;
    outline: none !important;
    background-image: none !important;
}

.is-valid {
    border-color: inherit !important;
}

/* Error message styling */
.error-msg {
    font-size: 12px;
    padding-left: 5px;
    color: #dc3545;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
    transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out;
    display: block;
    /* Ensures it takes up space when active */
}

/* Apply error styling to file upload */
/* Apply error styling to dropdown header instead of hidden input */
.custom-dropdown.is-invalid{
    background: none !important;
}
.custom-dropdown.is-invalid .dropdown-header {
    border: 2px solid #dc3545 !important;
    background: #ffebee !important;
}

/* Error message should be placed after the dropdown */
.custom-dropdown.is-invalid + .error-msg {
    display: block;
    font-size: 12px;
    padding-left: 5px;
    color: #dc3545;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
}

textarea.is-invalid:hover{
    border-color: #dc3545 !important;
    background: #ffebee !important;
}

@media(max-width: 768px) {
    .submit-btn {
        font-size: 18px;
    }
}

.upload-container {
    width: 100%;
    max-width: 500px;
    margin: auto;
    text-align: center;
}

.upload-box {
    border: 2px dashed #ABABAB;
    padding: 30px;
    border-radius: 12px;
    background: #F6F6F6;
}

.upload-icon-label {
    display: inline-block;
    cursor: pointer;
}

.upload-icon {
    border: 2px dashed #ABABAB;
}

.upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1E9BD01A;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #1E9BD0;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: #1e9bd025;
}

.uploaded-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* Maintains equal gap */
    margin-top: 10px;
}

.image-box {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #0000008A;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 400;
    transition: 0.3s ease-in-out;
}

.remove-btn:hover {
    background: #000000bd;
}

.notes .form-input-icon{
    top: 20px !important;
}
