.require-alert {
    display: none;
    color: #d90429;
    margin-top: 5px;
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.5;
}

.required-star {
    color: #d90429;
}

.form-container {
    padding: 10px 20px 20px;
}

.popup .form-container {
    padding: 10px 20px 75px 20px;
}

.form-container .form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.form-container label {
    font-size: 13px;
    margin-bottom: 2px;
    text-align: left;
}

.form-container input,
.form-container textarea {
    padding: 10px;
    border: 1px solid #D3D3D3;
    border-radius: 10px;
    font-size: 16px;
}

.form-container input:focus-visible,
.form-container textarea:focus-visible {
    outline: solid 1px #D3D3D3;
}

.form-container textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio Buttons */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    cursor: pointer;
    display: block;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 15px;
    border: 1px solid #D3D3D3;
    border-radius: 10px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-content {
    color: #7161EF !important;
    border-color: #7161EF;
    background-color: #F7F6FE;
}

.radio-content:hover {
    border-color: #B8B0F7;
}

.radio-title {
    font-weight: 600;
    font-size: 14px;
    color: #1D1D1D;
}

.radio-description {
    font-size: 12px;
    color: #666;
}


/* Checkboxes */

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 2px 0px;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.2s ease;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #7161EF;
}

.checkbox-option span {
    font-size: 14px;
    font-weight: 500;
    color: #1D1D1D;
}


/* Helper Text */

.help-text {
    font-size: 12px;
    text-align: left;
    color: #999;
    margin-top: 0px;
    margin-bottom: 10px;
}

/* Validation and errors */

.validation-failed-on-submit:has(input:invalid, textarea:invalid) .require-alert {
    display: block;
}

.validation-failed-on-submit:has(.field-error.visible) .require-alert {
    display: block;
}

.validation-failed-on-submit .form-container input:invalid,
.validation-failed-on-submit .form-container textarea:invalid {
    border: 1px solid #d90429;
}

.field-error {
    display: none;
    color: #d90429;
    font-size: 12px;
    margin-top: 4px;
    text-align: left;
}

.validation-failed-on-submit .form-group:has(input:invalid, textarea:invalid) .field-error {
    display: block;
}

.field-error.visible {
    display: block;
}

/* Submit div */

.submit-div {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background-color: #fff;
    padding: 10px 20px;
    transition: all 1s;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.popup.active .submit-div {
    bottom: 0;
    transition: all 1s;
}

.submit-div button {
    width: 100%;
}

/* Password Requirements: sign up page and user profile page */
.password-requirements {
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.password-requirements .requirements-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-requirements .requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
}

.password-requirements .requirement-icon {
    font-size: 16px;
    color: #D3D3D3;
    transition: all 0.2s ease;
}

.password-requirements .requirement-item.met {
    color: #198754;
}

.password-requirements .requirement-item.met .requirement-icon {
    color: #198754;
}

/* Dropdowns */

.form-dropdown {
    padding: 10px 12px;
    border: 1px solid #D3D3D3;
    border-radius: 10px;
    font-size: 14px;
    font-family: "Quicksand", sans-serif;
    background-color: #fff;
    color: #1D1D1D;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    min-width: 150px;
}

.form-dropdown:focus {
    outline: solid 1px #D3D3D3;
    border-color: #1D1D1D;
}

.form-dropdown:hover {
    border-color: #1D1D1D;
}

.form-dropdown.input-error {
    border-color: #d90429;
}

.form-dropdown option {
    padding: 10px;
}

.form-dropdown option:disabled {
    color: #999;
}


/* ===== CUSTOM DROPDOWN ===== */

.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D3D3D3;
    border-radius: 10px;
    font-size: 14px;
    font-family: "Quicksand", sans-serif;
    background-color: #fff;
    color: #1D1D1D;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s ease;
}

.custom-dropdown-trigger:focus {
    outline: solid 1px #D3D3D3;
}

.custom-dropdown.open .custom-dropdown-trigger {
    outline: solid 1px #D3D3D3;
}

.custom-dropdown-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-dropdown.placeholder .custom-dropdown-label {
    color: #999;
}

.custom-dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.custom-dropdown.open .custom-dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    text-align: left;
    margin-top: 4px;
    background-color: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
}

.custom-dropdown-menu.active {
    display: block;
}

.custom-dropdown-item {
    padding: 10px 15px;
    font-size: 14px;
    color: #1D1D1D;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #F1F1F1;
}

.custom-dropdown-item:last-child {
    border-bottom: none;
}

.custom-dropdown-item:hover,
.custom-dropdown-item.highlighted {
    background-color: #F8F8F8;
}

.custom-dropdown-item.selected {
    background-color: #F7F6FE;
    font-weight: 500;
}

.custom-dropdown-no-options {
    padding: 12px 15px;
    font-size: 13px;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* Disabled state */
.custom-dropdown.disabled .custom-dropdown-trigger {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.custom-dropdown.disabled .custom-dropdown-trigger:hover {
    border-color: #D3D3D3;
}


/* ===== AUTOCOMPLETE DROPDOWN ===== */

.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #D3D3D3;
    border-radius: 10px;
    font-size: 14px;
    font-family: "Quicksand", sans-serif;
    background-color: #fff;
    color: #1D1D1D;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.autocomplete-input:focus {
    outline: solid 1px #D3D3D3;
}

.autocomplete-input.input-error {
    border-color: #d90429;
}

.autocomplete-input::placeholder {
    color: #999;
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    text-align: left;
    background-color: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 15px;
    font-size: 14px;
    color: #1D1D1D;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #F1F1F1;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #F8F8F8;
}

.autocomplete-item.selected {
    background-color: #F7F6FE;
    font-weight: 500;
}

.autocomplete-no-results {
    padding: 12px 15px;
    font-size: 13px;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* Clear button for autocomplete */
.autocomplete-clear {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    display: none;
}

.autocomplete-clear:hover {
    color: #d90429;
}

.autocomplete-container.has-value .autocomplete-clear {
    display: block;
}

/* Loading spinner inside the input while options are being fetched */
.autocomplete-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #848484;
    font-size: 13px;
    display: none;
    pointer-events: none;
}

.autocomplete-container.loading .autocomplete-spinner {
    display: block;
}

/* Hide the dropdown caret and clear button while loading */
.autocomplete-container.loading .autocomplete-input {
    background-image: none;
}

.autocomplete-container.loading .autocomplete-clear {
    display: none;
}

/* Disabled state */
.autocomplete-container.disabled .autocomplete-input {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.autocomplete-container.disabled .autocomplete-input:hover {
    border-color: #D3D3D3;
}


@media (min-width: 600px) {

    .form-container {
        padding-bottom: 0px;
    }

    .popup .form-container {
        padding: 10px 20px 20px;
    }

    .submit-div {
        position: relative;
        padding: 10px 0px;
    }

    .submit-div button {
        width: auto;
    }

}