/* Кастомный чекбокс для политики */
.jform {font-size:initial;}
.policy-checkbox {
    position: relative;
    padding-left: 2rem;
}

.policy-checkbox-input {
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
}

.policy-checkbox-label {
    position: relative;
    cursor: pointer;
    margin-bottom: 0;
	padding-left: .5rem;
}

.policy-checkbox-label::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 3px;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

.policy-checkbox-input:checked + .policy-checkbox-label::before {
    background-color: #ef7622;
    box-shadow: #ffffff 0 0 0 3px inset;
    border-color: #ef7622;
}

.policy-checkbox-input:focus + .policy-checkbox-label::before {
    border-color: #ef7622;
}

.policy-checkbox-input:disabled + .policy-checkbox-label::before {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Исправление отображения валидации для кастомного чекбокса */
.policy-checkbox-input.is-invalid + .policy-checkbox-label::before {
    border-color: #dc3545;
}

.policy-checkbox-input.is-valid + .policy-checkbox-label::before {
    background-color: #ef7622;
    box-shadow: #ffffff 0 0 0 3px inset;
    border-color: #ef7622;
}

/* Убираем стандартное сообщение при фокусе */
.policy-checkbox-input:invalid ~ .invalid-feedback {
    display: none;
}

.policy-checkbox-input.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Остальные существующие стили */
.jform .is-invalid {
    border-color: #dc3545;
}
.form-field {
    position: relative;
    margin-bottom: 1.5rem !important;
}

.form-label-overlay {
    position: absolute;
    top: -12px;
    left: 7px;
    background: white;
    padding: 0 6px;
    font-size: 14px;
    color: #495057;
    z-index: 10;
    margin-bottom: 0;
    font-weight: 500;
}

.form-control, .form-select {
    position: relative;
    z-index: 5;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
    position: relative;
    z-index: 6;
}

/* Стили для селекта */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}
input[type="file"] {
    height: 50px!important;
    line-height: 40px!important;
}
.multiselect-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: white;
}

.multiselect-options {
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.selected-tag {
    background: #ef7622;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.selected-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
}

/* Стили для кастомных чекбоксов продуктов в dropdown */
.multiselect-options .product-checkbox-item {
    padding-left: 2rem;
    margin-bottom: 0.5rem;
}

.multiselect-options .product-checkbox-input {
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
}

.multiselect-options .product-checkbox-label {
    position: relative;
    padding-left: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
}

.multiselect-options .product-checkbox-label::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.1rem;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

.multiselect-options .product-checkbox-input:checked + .product-checkbox-label::before {
    background-color: #ef7622;
    box-shadow: #ffffff 0 0 0 3px inset;
    border-color: #ef7622;
}

.multiselect-options .product-checkbox-input:focus + .product-checkbox-label::before {
    border-color: #ef7622;
}

.policy-checkbox-input.is-invalid + .policy-checkbox-label::before {
    border-color: #dc3545 !important;
    
}
.policy-checkbox-input.is-invalid ~ .invalid-feedback {
    display: block !important;
}
.form-check-input.is-valid~.form-check-label, .was-validated .form-check-input:valid~.form-check-label {
    color: unset!important;
}
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}
.form-control {
	line-height:2!important;
}