/* Правки UI формы записи: контраст, компактность, группировка диагностики, врачи */

.appointment-form .modal.appointment-modal:not([hidden]) {
	align-items: flex-start;
}

.appointment-form .modal.appointment-modal:not([hidden]) > .modal__wrap {
	display: flex;
	flex-direction: column;
	max-height: min(90vh, calc(100dvh - 24px));
	min-height: 0;
	overflow: hidden;
	margin: auto;
	box-sizing: border-box;
}

.appointment-form .modal__wrap {
	min-height: 0 !important;
	box-sizing: border-box;
}

.appointment-form .modal__header,
.appointment-form .modal__footer {
	flex-shrink: 0;
}

.appointment-form .modal__header {
	padding: 16px 120px 10px 24px;
}

.appointment-form .modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 0 24px 12px;
	margin-bottom: 0;
}

.appointment-form .modal__footer {
	padding: 12px 24px 16px;
	border-top: 1px solid #b7c6d4;
	background: #fff;
}

.appointment-form .modal__footer .modal__btn {
	margin-left: auto;
}

.appointment-form .modal__footer .modal__btn-back {
	margin-left: 0;
}

.appointment-form .modal__title {
	font-weight: 400;
	color: #12283c;
}

.appointment-form .modal__text {
	color: #3d4f61;
}

.appointment-form .modal__subtitle {
	font-weight: 400;
	color: #12283c;
}

.appointment-form .modal__subtitle:not(:last-child) {
	margin-bottom: 10px;
}

.appointment-form .radio__field label {
	padding: 8px 0;
}

.appointment-form .form:not(:last-child) {
	margin-bottom: 10px;
}

.appointment-form .form__field input {
	height: 42px;
}

.appointment-form .steps:not(:last-child) {
	margin-bottom: 12px;
}

.appointment-form .steps__text {
	color: #1a3d63;
	font-weight: 500;
}

.appointment-form .steps__item:not(.active) .steps__text {
	color: #4a6174;
}

.appointment-form .steps__scale {
	background: #c5d2de;
}

.appointment-form .chosen {
	background: #e8f1f8;
	border: 1px solid #9eb6cc;
}

.appointment-form .chosen__item,
.appointment-form .chosen__item:not(:last-child)::after {
	color: #2a4258;
}

.appointment-form .chosen__status {
	color: #244f7e;
}

.appointment-form .radio__field label .text {
	color: #3d4f61;
}

.appointment-form .radio__field input:checked + label .text {
	color: #1a3d63;
}

.appointment-form .form__field input,
.appointment-form .form__field textarea {
	border: 1.5px solid #8aa0b4;
	color: #12283c;
}

.appointment-form .form__field label {
	color: #4a6174;
}

.appointment-form .form__checkbox label .check {
	border: 1.5px solid #8aa0b4;
}

/* Кнопка «Закрыть» вместо крестика */
.appointment-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 20;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: 36px;
	margin: 0;
	padding: 0 14px;
	border: 1.5px solid #8aa0b4;
	border-radius: 8px;
	background: #fff;
	color: #1a3d63;
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
}

.appointment-modal__close:hover {
	color: #fff;
	background: #244f7e;
	border-color: #244f7e;
}

/* Специализации / диагностика */
.appointment-form .categories__title {
	opacity: 1;
	font-weight: 500;
	font-size: 13px;
	line-height: 16px;
	color: #1a3d63;
	margin-bottom: 8px;
}

.appointment-form .categories__block:not(:last-child) {
	margin-bottom: 12px;
}

.appointment-form .categories__list {
	gap: 6px;
	align-items: stretch;
}

.appointment-form .categories__item {
	display: flex;
	box-sizing: border-box;
}

.appointment-form .categories__block > .categories__list .categories__item {
	flex: 0 0 calc((100% - 5 * 6px) / 6);
}

.appointment-form .categories__item label {
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	height: auto;
	padding: 6px 8px 6px 10px;
	gap: 8px;
	box-shadow: 0 0 0 1.5px #8aa0b4;
	align-items: center;
}

.appointment-form .categories__item label .text {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 0;
	color: #12283c;
	font-weight: 400;
	font-size: 13px;
	line-height: 16px;
	display: block;
	overflow: visible;
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	-webkit-line-clamp: unset;
}

.appointment-form .categories__item label .icon-wrap {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border: 2px solid #6f879b;
	margin-left: 4px;
}

.appointment-form .categories__item input:checked + label {
	box-shadow: 0 0 0 2px #244f7e;
}

.appointment-form .categories--diag {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
}

.appointment-form .categories--diag .categories__item {
	min-width: 0;
	flex: none;
	width: auto;
}

.appointment-form .categories--diag .categories__item label {
	min-height: 56px;
	height: auto;
	align-items: flex-start;
	padding: 8px 8px 8px 10px;
	background: #f4eef8;
	box-shadow: 0 0 0 1.5px #b79bc9;
}

.appointment-form .categories--diag .categories__item label .text {
	font-size: 12px;
	line-height: 15px;
	font-weight: 400;
}

.appointment-form .categories--diag .categories__item label .icon-wrap {
	margin-top: 0;
	align-self: flex-start;
}

.appointment-form .categories--diag .categories__item input:checked + label {
	background: #efe4f7;
	box-shadow: 0 0 0 2px #244f7e;
}

.appointment-form .modal.modal--big:not([hidden]) > .modal__wrap {
	width: 1395px;
	max-width: calc(100vw - 48px);
}

@media (max-width: 1259px) {
	.appointment-form .categories__block > .categories__list .categories__item {
		flex: 0 0 calc((100% - 2 * 6px) / 3);
	}

	.appointment-form .categories--diag {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.appointment-form .categories--diag {
		grid-template-columns: 1fr;
	}
}

/* Филиалы */
.appointment-form .filials__item label {
	position: relative;
	box-shadow: inset 0 0 0 1.5px #8aa0b4;
	cursor: pointer;
}

.appointment-form .filials__item label .title {
	color: #12283c;
}

.appointment-form .filials__item label .text {
	color: #2a4258;
	font-weight: 400;
}

.appointment-form .filials__item label .select-mark {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-left: auto;
	border: 2px solid #6f879b;
	border-radius: 50%;
	background: #fff;
}

.appointment-form .filials__item label .select-mark .icon {
	display: none;
	width: 10px;
	height: 10px;
	color: #fff;
	stroke: #fff;
}

.appointment-form .filials__item input:checked + label {
	box-shadow: inset 0 0 0 2px #244f7e;
}

.appointment-form .filials__item input:checked + label .select-mark {
	background: #2b4e84;
	border-color: #2b4e84;
}

.appointment-form .filials__item input:checked + label .select-mark .icon {
	display: block;
}

.appointment-form .filials__item label .checked {
	display: none !important;
}

.appointment-form .filials__item .icon-wrap {
	background: #9eb6cc;
}

.appointment-form .modal__btn-back.btn--transparent {
	color: #1a3d63;
	font-weight: 400;
	border: 1.5px solid #8aa0b4;
}

.appointment-form .modal__footer .modal__btn.btn--primary {
	background: #244f7e;
	border: 1.5px solid #244f7e;
	border-radius: 8px;
	color: #fff;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.appointment-form .modal__footer .modal__btn.btn--primary:hover {
	background: #1c3e64;
	border-color: #1c3e64;
}

.appointment-form .form__error {
	margin-top: 6px;
	color: #e53935;
	font-size: 12px;
	line-height: 16px;
}

.appointment-form .form__error[hidden] {
	display: none !important;
}

/* Врачи: фото + ФИО слева, описание справа */
.appointment-form .doctors-panel {
	position: relative;
}

.appointment-form .doctors {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	align-items: stretch;
}

.appointment-form .doctors__item {
	flex: none;
	width: auto;
	min-width: 0;
	max-width: 100%;
	display: flex;
}

.appointment-form .doctors__item label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	max-width: 100%;
	height: 100%;
	padding: 10px 28px 10px 10px;
	min-width: 0;
	min-height: 0;
	box-sizing: border-box;
	overflow: hidden;
	box-shadow: 0 0 0 1.5px #8aa0b4;
}

.appointment-form .doctors__img {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	margin-bottom: 0;
}

.appointment-form .doctors__img:not(:last-child) {
	margin-bottom: 0;
}

.appointment-form .doctors__meta {
	flex: 1 1 0;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	padding-top: 0;
}

.appointment-form .doctors__name,
.appointment-form .doctors__text {
	overflow-wrap: anywhere;
	word-wrap: break-word;
	word-break: break-word;
	white-space: normal;
}

.appointment-form .doctors__name {
	font-size: 13px;
	line-height: 16px;
	margin-bottom: 6px;
	color: #12283c;
	font-weight: 500;
}

.appointment-form .doctors__name:not(:last-child) {
	margin-bottom: 6px;
}

.appointment-form .doctors__text {
	color: #2a4258;
	font-size: 12px;
	line-height: 15px;
}

.appointment-form .doctors__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	margin-top: 4px;
}

.appointment-form .doctors__price-label {
	font-size: 12px;
	line-height: 15px;
	color: #2a4258;
	white-space: nowrap;
}

.appointment-form .doctors__price-new {
	color: #12283c;
	font-size: 14px;
	line-height: 17px;
	font-weight: 600;
	white-space: nowrap;
}

.appointment-form .doctors__price-old {
	white-space: nowrap;
}

.appointment-form .doctors__item label .checked {
	top: 10px;
	right: 10px;
}

.appointment-form .doctors__more {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 52px;
	min-height: 120px;
	padding: 12px 6px;
	border: 0;
	border-radius: 12px 0 0 12px;
	background: #244f7e;
	color: #fff;
	font-size: 11px;
	font-weight: 500;
	line-height: 13px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(36, 79, 126, .35);
}

.appointment-form .doctors__more.is-visible {
	display: flex;
}

.appointment-form .doctors__more:hover {
	background: #1c3e64;
}

.appointment-form .doctors__more-icon {
	font-size: 22px;
	line-height: 1;
}

.appointment-form .doctors-panel.has-overflow .doctors {
	padding-right: 60px;
	max-height: inherit;
	overflow-y: auto;
}

@media (max-width: 1259px) {
	.appointment-form .doctors {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.appointment-form .modal.modal--big:not([hidden]) > .modal__wrap {
		width: 980px;
	}

	.appointment-form .categories__block > .categories__list .categories__item {
		flex: 0 0 calc((100% - 2 * 6px) / 3);
	}
}

@media (max-width: 620px) {
	.appointment-form .modal.appointment-modal:not([hidden]) {
		padding: 0;
		align-items: stretch;
	}

	.appointment-form .modal.appointment-modal:not([hidden]) > .modal__wrap,
	.appointment-form .modal.modal--big:not([hidden]) > .modal__wrap {
		width: 100%;
		max-width: 100%;
		max-height: 100dvh;
		border-radius: 0;
	}

	.appointment-form .doctors {
		grid-template-columns: 1fr;
	}

	.appointment-form .modal__btn-back .text {
		display: inline;
	}
}
