/* Обвертка модального окна */
.specialist-modal__wrapper {
    width: 100%;
    height: 100dvh;
    padding: 24px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    overflow-y: auto;

    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5; /* Выше навигации */
}

/* Само модальное окно, нужно для прокрутки на мобиле */
.specialist-modal {
    background-color: #FFFFFF;
    border-radius: 20px;
}

.specialist-modal_add {
    width: min(720px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    border: 1px solid rgba(189, 146, 206, 0.28);
    border-radius: 16px;
    box-shadow: 0 24px 72px rgba(36, 26, 43, 0.22);
    overflow: hidden;
}

/* Контент модального окна */
.specialist-modal__content {
    width: min(560px, 100%);
    box-sizing: border-box;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;

    margin: 0 auto;
}

.specialist-modal__content_add {
    width: 100%;
    max-height: calc(100dvh - 48px);
    padding: 22px 28px 0;
    gap: 16px;
    overflow: hidden;
}
.specialist-modal__title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#specialist-add-wrapper .specialist-modal__title {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(189, 146, 206, 0.2);
}

.specialist-modal__title .p1-strong {
    font-size: 20px;
    text-transform: uppercase;
}

/* Кнопка закрытия модального окна */
.specialist-modal__close-button {
    width: 32px;
    height: 32px;

    opacity: .7;
    transition: .15s all;
    cursor: pointer;
}

/* Кнопка закрытия модального окна */
/* Кнопка внутри инпута с информацией */
@media (hover: hover) {
    .specialist-modal__close-button:hover,
    .specialist-input__wrapper-img:hover {
        opacity: 1;
    }
}

@media (hover: none) {
    .specialist-modal__close-button:active,
    .specialist-input__wrapper-img:active {
        opacity: 1;
    }
}


/* Форма ввода данных */
.specialist-modal__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#specialist-add-form {
    min-height: 0;
    gap: 14px;
    padding: 0 4px 0 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.specialist-add-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.specialist-add-group {
    gap: 8px;
}

.specialist-add-group + .specialist-add-group {
    padding-top: 14px;
}

/* Инпуты с информацией */
.specialist-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.specialist-input label {
    font-weight: 500;
}

.specialist-input input {
    height: 40px;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    font-size: 20px;

    border: 1px solid #bd92ce;
    border-radius: 10px;
}

#specialist-add-wrapper .specialist-input {
    gap: 6px;
}

#specialist-add-wrapper .specialist-input label {
    font-size: 15px;
    line-height: 1.25;
}

#specialist-add-wrapper .specialist-input input {
    height: 38px;
    font-size: 16px;
    border-radius: 8px;
}

#specialist-add-wrapper .specialist-input__wrapper-img {
    top: 9px;
}

.specialist-input input:read-only {
    color: rgba(0, 0, 0, 0.5);
}

/* Если инпут обвернут, то в нем есть картинка справа */
.specialist-input__wrapper {
    width: 100%;
    position: relative;
}

/* Увеличиваем отступ от правого края */
.specialist-input__wrapper input {
    padding-right: 50px;
}

/* Картинка поверх инпута */
.specialist-input__wrapper-img {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 10px;
    right: 16px;

    opacity: .7;
    transition: .15s all;
    cursor: pointer;
}

/* Чекбокс */
.specialist-input__checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Скрываем сам чекбокс */
.specialist-input__checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.specialist-input-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 8px;
    border: 1px solid #bd92ce;
    position: relative;
    cursor: pointer;
}

.specialist-input__checkbox-wrapper input[type="checkbox"]:checked ~ .specialist-input-checkbox {
    background-image: url("/assets/admin/checkbox.svg");
    background-repeat: no-repeat;
}

#specialist-add-wrapper .specialist-package-options {
    gap: 8px;
}

#specialist-add-wrapper .specialist-package-option {
    gap: 6px;
}

#specialist-add-wrapper .specialist-package-option__row {
    align-items: center;
}

#specialist-add-wrapper .specialist-package-option__row .specialist-input__checkbox-wrapper {
    align-items: center;
}

#specialist-add-wrapper .specialist-package-option__description,
#specialist-add-wrapper .specialist-add-group > .p-gray {
    font-size: 14px;
    line-height: 1.35;
}


/* Кнопки Отменить и Сохранить */
.specialist-modal__buttons {
    display: flex;
    gap: 20px;
    margin: 24px auto 0 auto;
}

#specialist-add-wrapper .specialist-modal__buttons {
    position: sticky;
    bottom: 0;
    justify-content: flex-end;
    gap: 12px;
    margin: 2px -4px 0;
    padding: 14px 0 20px;
    border-top: 1px solid rgba(189, 146, 206, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, #ffffff 34%);
}
.specialist-modal__buttons button {
    width: 238px;
    height: 40px;

    font-size: 20px;
    border-radius: 10px;

}

#specialist-add-wrapper .specialist-modal__buttons button {
    width: 180px;
    height: 38px;
    font-size: 16px;
    border-radius: 8px;
}

/* Кнопка Сохранить */
.specialist-modal__button-submit {
    color: #ffffff !important;
}

/* Кнопка отмены */
.specialist-modal__button-cancel {
    background-color: transparent;
    border: 2px solid #bd92ce;
    color: #bd92ce !important;
}

@media (hover: hover) {
    .specialist-modal__button-cancel:hover {
        color: #ffffff !important;
        background-color: #000000;
        border-color: #000000;
    }
}

@media (hover: none) {
    .specialist-modal__button-cancel:active {
        color: #ffffff !important;
        background-color: #000000;
        border-color: #000000;
    }
}

.specialist-modal__error {
    display: none;
    color: red;
    font-size: 16px;
    margin-bottom: -24px;
}

#specialist-add-wrapper .specialist-modal__error {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.35;
}
