label,
.form-label {
    color: #333;
}

input,
select,
textarea,
.form-control,
.form-select {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    border-color: #ced4da !important;
}

input.form-control,
select.form-select {
    height: 38px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: 1.5;
    border-color: #ced4da !important;
}

input::placeholder,
textarea::placeholder {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    color: #aaa !important;
}

textarea.form-control {
    min-height: 60px;
}

.form-control:focus,
.form-select:focus {
    border-color: #1ab394 !important;
    box-shadow: 0 0 0 0.2rem rgba(26, 179, 148, 0.25) !important;
    outline: 0;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #ed5565 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ed5565' viewBox='0 0 16 16'%3e%3cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3e%3cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px 18px;
    padding-right: 2.25rem;
}

.was-validated .form-select:invalid,
.form-select.is-invalid {
    border-color: #ed5565 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ed5565' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem !important;
}

.was-validated .form-control:invalid:focus,
.was-validated .form-select:invalid:focus,
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #ed5565 !important;
    box-shadow: 0 0 0 0.2rem rgba(237, 85, 101, 0.25) !important;
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #ced4da !important;
    background-image: none !important;
    padding-right: 0.75rem !important;
    box-shadow: none !important;
}

.was-validated .form-select:valid,
.form-select.is-valid {
    border-color: #ced4da !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    padding-right: 2.25rem !important;
    box-shadow: none !important;
}

.was-validated .form-control:valid:focus,
.was-validated .form-select:valid:focus {
    border-color: #1ab394 !important;
    box-shadow: 0 0 0 0.2rem rgba(26, 179, 148, 0.25) !important;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
    font-family: 'Poppins', sans-serif !important;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 38px !important;
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-select-trigger:not(.has-value) {
    color: #aaa;
}

.custom-select-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 16px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231ab394' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #1ab394;
    box-shadow: 0 0 0 0.2rem rgba(26, 179, 148, 0.25);
}

.custom-select-wrapper.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-color: #1ab394 !important;
    border: 1px solid #1ab394;
    border-radius: 0.375rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.custom-select-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-options.open-up {
    margin-top: 0;
    margin-bottom: 2px;
    transform: translateY(10px);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.custom-select-options.open-up.open {
    transform: translateY(0);
}

.custom-select-search {
    padding: 8px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.custom-select-search input {
    width: 100%;
    padding: 6px 10px 6px 30px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    outline: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231ab394' viewBox='0 0 16 16'%3e%3cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 8px center;
    background-size: 14px;
}

.custom-select-search input:focus {
    border-color: #1ab394;
}

.custom-options-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
    margin: 0;
    list-style: none;
    position: relative;
}

.custom-option {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    margin: 1px 6px;
    border-radius: 6px;
}

.custom-option:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #ced4da 100%) !important;
    color: #333 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.custom-option.selected {
    background: linear-gradient(135deg, #1ab394 0%, #ffffff 100%);
    color: #fff !important;
    font-weight: 600;
}

.custom-option.hidden {
    display: none;
}

.was-validated select:invalid+.custom-select-wrapper .custom-select-trigger,
.is-invalid+.custom-select-wrapper .custom-select-trigger {
    border-color: #ed5565 !important;
    padding-right: 2.25rem;
}

.was-validated select:invalid+.custom-select-wrapper .custom-select-trigger::after,
.is-invalid+.custom-select-wrapper .custom-select-trigger::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ed5565' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

.was-validated select:valid+.custom-select-wrapper .custom-select-trigger,
.is-valid+.custom-select-wrapper .custom-select-trigger {
    border-color: #ced4da !important;
}

.input-group>.custom-select-wrapper {
    flex: 1 1 auto;
    width: 1%;
}

.input-group>.custom-select-wrapper .custom-select-trigger {
    border-radius: 0;
}

.input-group>.custom-select-wrapper:first-child .custom-select-trigger {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.input-group>.custom-select-wrapper:not(:first-child) .custom-select-trigger {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

.input-group>.custom-select-wrapper:last-child .custom-select-trigger {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.custom-select-wrapper.phone-type-wrapper {
    flex: 0 0 110px !important;
    width: 110px !important;
}

.custom-select-wrapper.loading-state .custom-select-options {
    display: none !important;
}

.custom-select-trigger.loading {
    color: #1ab394;
    pointer-events: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
    justify-content: flex-start;
    font-weight: 600;
    font-size: 13px;
}

.custom-select-trigger.loading::after {
    display: none;
}

.trigger-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: conic-gradient(#e9ecef 0%, #1abc9c 35%, #3498db 70%, #e9ecef 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px + 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px + 1px));
    animation: customSelectSpin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes customSelectSpin {
    to {
        transform: rotate(360deg);
    }
}

.custom-select-options.content-loaded .custom-select-search,
.custom-select-options.content-loaded .custom-options-list {
    animation: slideContentIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.search-no-result {
    padding: 15px;
    text-align: center;
    font-size: 13px;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 0;
}

@keyframes slideContentIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}
