/**
 * Мобильная шапка: выбор клиники / телефон вместо «версии для слабовидящих».
 */

.header__visibility {
	display: none !important;
}

.footer__visibility {
	display: flex;
	align-items: center;
	margin-top: 16px;
}

.footer__visibility .vision-button {
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
}

.header__address-pick-mobile {
	display: none;
}

@media (max-width: 768px) {
	.header.header--clinic-pick .header__top,
	.header.header--clinic-selected .header__top,
	.header.header--single-clinic .header__top {
		height: auto;
		min-height: 40px;
		padding: 6px 0;
	}

	.header__top-flex {
		align-items: center;
	}

	.header__top-flex .header__address-label {
		display: none;
	}

	/* Выбор клиники — только в верхней полоске, не в бургере */
	.header.header--clinic-pick .header__top-flex .header__address {
		display: block;
		margin-left: auto;
		margin-right: 0;
		max-width: none;
		flex: 1 1 auto;
		min-width: 0;
	}

	.header.header--clinic-pick .header__top-flex .header__address-current {
		padding: 4px 0;
		gap: 8px;
		justify-content: flex-end;
		width: 100%;
		min-height: 32px;
		font-size: 16px;
		font-weight: 700;
	}

	.header.header--clinic-pick .header__top-flex .header__address-current .js-header-address-text {
		font-size: inherit;
		font-weight: inherit;
		line-height: 1.25;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: min(56vw, 240px);
		color: #208d79;
	}

	.header.header--clinic-pick .header__top-flex .header__address-current svg {
		width: 12px;
		height: 7px;
		flex-shrink: 0;
	}

	.header.header--clinic-pick .header__top-flex .header__address-dropdown {
		right: 0;
		left: auto;
		min-width: 280px;
		max-width: calc(100vw - 32px);
	}

	.header.header--clinic-pick .header__top-flex .header__address-item {
		font-size: 14px;
		line-height: 1.35;
		color: #373737;
	}

	.header.header--clinic-pick .header__top-flex .header__time,
	.header.header--clinic-pick .header__top-flex .header__phone {
		display: none !important;
	}

	.header.header--clinic-selected .header__top-flex .header__address,
	.header.header--single-clinic .header__top-flex .header__address,
	.header.header--clinic-selected .header__top-flex .header__time,
	.header.header--single-clinic .header__top-flex .header__time {
		display: none !important;
	}

	.header.header--clinic-selected .header__top-flex .header__phone,
	.header.header--single-clinic .header__top-flex .header__phone {
		display: block !important;
		margin-left: auto;
		margin-right: 0;
		font-size: 16px;
		font-weight: 700;
		white-space: nowrap;
	}

	.header.header--clinic-selected .header__top-flex .header__phone a,
	.header.header--single-clinic .header__top-flex .header__phone a {
		color: #373737;
	}

	.header__address-pick-desktop {
		display: none;
	}

	.header__address-pick-mobile {
		display: inline;
	}
}

@media (max-width: 1070px) {
	.header__dropdown {
		top: 0 !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		min-height: 100dvh !important;
		overflow-x: hidden;
		overflow-y: auto;
		background-color: var(--primary, #208d79) !important;
		-webkit-overflow-scrolling: touch;
	}

	.header__dropdown > .container,
	.header__dropdown-flex {
		background-color: var(--primary, #208d79);
		min-height: 100%;
	}

	.header__dropdown-flex {
		padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
	}

	/* В бургере адрес не дублируем — выбор только в верхней полоске */
	.header__dropdown-flex .header__address {
		display: none !important;
	}

	.header.header--clinic-selected .header__dropdown-flex .header__phone,
	.header.header--single-clinic .header__dropdown-flex .header__phone {
		display: none !important;
	}

	.header__dropdown .header__burger-clinic-contacts {
		display: block;
		width: 100%;
		padding: 8px var(--wrap-p, 15px) 0;
	}

	.header__burger-clinic-phone {
		display: flex;
		align-items: center;
		width: 100%;
		color: #fff;
		font-size: 20px;
		font-weight: 700;
		line-height: 1.3;
		padding: 12px 0;
		text-decoration: none;
	}

	.header__burger-clinic-phone:hover,
	.header__burger-clinic-phone:focus-visible {
		color: #fff;
		opacity: 0.92;
	}

	.header__dropdown .header__socials {
		display: inline-block !important;
		padding: 8px var(--wrap-p, 15px) 16px;
		width: 100%;
		margin: 0;
	}

	.header__dropdown .header__socials a {
		display: inline-block;
		margin-right: 15px;
		padding: 8px 0;
		vertical-align: middle;
	}

	.header__dropdown .header__socials a:last-child {
		margin-right: 0;
	}

	.header__dropdown .header__socials img {
		width: 40px;
		height: 40px;
		display: block;
	}

	.header.header--clinic-pick .header__dropdown .header__socials {
		display: none !important;
	}

	.header__dropdown .header__burger-clinic-pick {
		display: block;
		width: 100%;
		padding: 8px var(--wrap-p, 15px) 16px;
	}

	.header__burger-clinic-pick-title {
		color: #fff;
		font-size: 20px;
		font-weight: 700;
		line-height: 1.2;
		padding: 12px 0;
	}

	.header__burger-clinic-pick-list {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.header__burger-clinic-pick-item {
		display: block;
		width: 100%;
		text-align: left;
		background: rgba(255, 255, 255, 0.12);
		border: 1px solid rgba(255, 255, 255, 0.28);
		border-radius: 12px;
		color: #fff;
		font-size: 15px;
		font-weight: 500;
		line-height: 1.45;
		padding: 14px 16px;
		cursor: pointer;
		transition: background-color 0.2s ease;
	}

	.header__burger-clinic-pick-item:hover,
	.header__burger-clinic-pick-item:focus-visible {
		background: rgba(255, 255, 255, 0.2);
	}

	.header__dropdown .header__burger-clinic-address {
		display: block;
		color: rgba(255, 255, 255, 0.9);
		font-size: 15px;
		font-weight: 500;
		line-height: 1.45;
		padding: 0 0 4px;
		margin-top: 0;
		max-width: 100%;
	}
}
