/*
 * Зона доставки сертификата — production v11 modal.
 * В checkout остаётся только кнопка. Карта открывается fixed-модалкой в body.
 */
.certificate-delivery-zone {
	position: relative;
	z-index: 6;
	grid-column: 1 / -1;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	margin-top: 4px;
}

.certificate-delivery-zone__open {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr) 24px;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	width: 100%;
	min-height: 64px;
	margin: 0;
	padding: 11px 14px 11px 12px;
	color: #333;
	font: inherit;
	text-align: left;
	
	border: 1px solid rgba(47, 47, 47, .09);
	border-radius: 15px;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.certificate-delivery-zone__open:hover {
	
	border-color: rgba(120, 134, 94, .28);
}

.certificate-delivery-zone__open:active {
	transform: translateY(1px);
}

.certificate-delivery-zone__open-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	color: #71805a;
	background: #e9eee1;
	border-radius: 12px;
}

.certificate-delivery-zone__open-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.certificate-delivery-zone__open-copy,
.certificate-delivery-zone__open-title,
.certificate-delivery-zone__open-subtitle {
	display: block;
	min-width: 0;
}

.certificate-delivery-zone__open-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
}

.certificate-delivery-zone__open-subtitle {
	margin-top: 3px;
	color: #858585;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.25;
}

.certificate-delivery-map-modal {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: none;
	box-sizing: border-box;
	padding: 16px;
}

.certificate-delivery-map-modal.is-open {
	display: block;
}

.certificate-delivery-map-modal[hidden] {
	display: none !important;
}

.certificate-delivery-map-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 20, 17, .62);
	backdrop-filter: blur(2px);
}

.certificate-delivery-map-modal__window {
	position: relative;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	width: 100%;
	height: calc(100dvh - 32px);
	max-height: 960px;
	margin: 0 auto;
	overflow: hidden;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.certificate-delivery-map-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 18px;
	background: #fff;
	border-bottom: 1px solid rgba(47, 47, 47, .08);
}

.certificate-delivery-map-modal__title {
	margin: 0;
	color: #2f2f2f;
	font-size: 20px;

}

.certificate-delivery-map-modal__subtitle {
	margin: 4px 0 0;
	color: #858585;
	font-size: 12px;
	line-height: 1.3;
}

.certificate-delivery-map-modal__close {
	display: flex;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: #2f2f2f;
	font: inherit;
	font-size: 27px;
	line-height: 1;
	background: #f7f7f8;
	border: 1px solid rgba(47, 47, 47, .08);
	border-radius: 50%;
	cursor: pointer;
}

.certificate-delivery-map-modal__map-shell {
	position: relative;
	min-height: 360px;
	overflow: hidden;
	background: #e9ece6;
}

.certificate-delivery-map-modal__map {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 360px;
	background: #e9ece6;
}

.certificate-delivery-map-modal__legend {
	position: absolute;
	left: 14px;
	bottom: 14px;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px 11px;
	color: #4e5544;
	font-size: 11px;
	line-height: 1;
	background: rgba(255, 255, 255, .95);
	border: 1px solid rgba(70, 80, 58, .10);
	border-radius: 999px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
	pointer-events: none;
}

.certificate-delivery-map-modal__legend span {
	width: 9px;
	height: 9px;
	background: rgba(120, 134, 94, .25);
	border: 2px solid #78865e;
	border-radius: 50%;
}

.certificate-delivery-map-modal__footer {
	padding: 12px 16px 16px;
	background: #fff;
	border-top: 1px solid rgba(47, 47, 47, .08);
}

.certificate-delivery-zone__status {
	display: grid;
	grid-template-columns: 9px minmax(0, 1fr);
	align-items: start;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	padding: 10px 11px;
	color: #666;
	font-size: 12px;
	line-height: 1.35;
	
	border-radius: 11px;
}

.certificate-delivery-zone__status-dot {
	width: 7px;
	height: 7px;
	margin-top: 4px;
	background: #a5a5a5;
	border-radius: 50%;
}

.certificate-delivery-zone__status.is-ok {
	color: #4d5b3b;
	background: #edf2e7;
}
.certificate-delivery-zone__status.is-ok .certificate-delivery-zone__status-dot {
	background: #718653;
}

.certificate-delivery-zone__status.is-error {
	color: #8f3933;
	background: #fff0ee;
}
.certificate-delivery-zone__status.is-error .certificate-delivery-zone__status-dot {
	background: #c95a51;
}

.certificate-delivery-zone__status.is-loading,
.certificate-delivery-zone__status.is-info {
	color: #5f6470;
	
}
.certificate-delivery-zone__status.is-loading .certificate-delivery-zone__status-dot,
.certificate-delivery-zone__status.is-info .certificate-delivery-zone__status-dot {
	background: #8c929c;
}

.certificate-delivery-map-modal__address {
	margin-top: 8px;
	padding: 10px 12px;
	
}

.certificate-delivery-map-modal__address[hidden] {
	display: none !important;
}

.certificate-delivery-map-modal__actions {
	display: grid;
	grid-template-columns: minmax(120px, .45fr) minmax(180px, 1fr);
	gap: 10px;
	margin-top: 10px;
}

.certificate-delivery-map-modal__button {
	
	padding: 10px 16px;
	font: inherit;
	border-radius: 12px;
	cursor: pointer;
}

.certificate-delivery-map-modal__button--secondary {
	color: #555;
	background: #f7f7f8;
	border: 1px solid rgba(47, 47, 47, .09);
}

.certificate-delivery-map-modal__button--primary {
	color: #fff;
	background: #78865e;
	border: 1px solid #78865e;
}

.certificate-delivery-map-modal__button--primary:hover {
	background: #68764f;
	border-color: #68764f;
}

[class*="ymaps-2-1-"][class*="suggest-panel"],
[class*="ymaps-2-1-"][class*="search__suggest"] {
	z-index: 100001 !important;
}

@media (max-width: 767px) {
	.certificate-delivery-zone {
		margin-top: 2px;
	}

	.certificate-delivery-zone__open {
		grid-template-columns: 36px minmax(0, 1fr) 20px;
		min-height: 60px;
		padding: 10px;
		border-radius: 13px;
	}

	.certificate-delivery-zone__open-icon {
		width: 36px;
		height: 36px;
		border-radius: 11px;
	}

	.certificate-delivery-zone__open-title {
		font-size: 13px;
	}

	.certificate-delivery-map-modal {
		padding: 0;
	}

	.certificate-delivery-map-modal__window {
		height: 100dvh;
		max-height: none;
		border-radius: 0;
	}

	.certificate-delivery-map-modal__header {
		padding: 12px 14px;
	}

	.certificate-delivery-map-modal__title {
		font-size: 18px;
	}

	.certificate-delivery-map-modal__subtitle {
		font-size: 11px;
	}

	.certificate-delivery-map-modal__close {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
	}

	.certificate-delivery-map-modal__map-shell,
	.certificate-delivery-map-modal__map {
		min-height: 280px;
	}

	.certificate-delivery-map-modal__footer {
		padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
	}

	.certificate-delivery-zone__status,
	.certificate-delivery-map-modal__address {
		font-size: 11px;
	}

	.certificate-delivery-map-modal__actions {
		grid-template-columns: 1fr 1.35fr;
	}

	.certificate-delivery-map-modal__button {
		min-height: 46px;
		padding: 9px 10px;
		font-size: 13px;
	}
}

/* v17: предупреждения доставки показываем рядом с выбором способа, а не в контактах. */
.certificate-delivery-alert {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	gap: 12px;
	box-sizing: border-box;
	width: 100%;
	margin: 2px 0 4px;
	padding: 14px;
	color: #594a42;
	background: #fbf5f1;
	border: 1px solid rgba(151, 104, 82, .16);
	border-radius: 15px;
}

.certificate-delivery-alert[hidden] {
	display: none !important;
}

.certificate-delivery-alert__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	color: #956d5b;
	background: rgba(151, 104, 82, .10);
	border-radius: 12px;
}

.certificate-delivery-alert__icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.certificate-delivery-alert__copy,
.certificate-delivery-alert__title,
.certificate-delivery-alert__text {
	display: block;
	min-width: 0;
}

.certificate-delivery-alert__title {
	margin-top: 1px;
	color: #3d3936;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.25;
}

.certificate-delivery-alert__text {
	margin-top: 4px;
	color: #786f69;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
}

.certificate-delivery-alert__action {
	display: inline-flex;
	align-items: center;
	margin-top: 9px;
	padding: 0;
	color: #71805a;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.certificate-delivery-alert__action:hover {
	text-decoration: underline;
}

.certificate-delivery-alert.is-error {
	color: #7f403a;
	background: #fff3f1;
	border-color: rgba(157, 75, 67, .14);
}

.certificate-delivery-alert.is-info {
	color: #555b52;
	background: #f4f5f1;
	border-color: rgba(113, 128, 90, .12);
}

@media (max-width: 767px) {
	.certificate-delivery-alert {
		grid-template-columns: 36px minmax(0, 1fr);
		gap: 10px;
		padding: 12px;
		border-radius: 13px;
	}

	.certificate-delivery-alert__icon {
		width: 36px;
		height: 36px;
		border-radius: 11px;
	}

	.certificate-delivery-alert__title {
		font-size: 13px;
	}

	.certificate-delivery-alert__text,
	.certificate-delivery-alert__action {
		font-size: 11px;
	}
}


/* =========================================================
 * v19 — финальная иерархия действий в курьерской доставке.
 * Карта — вторичное действие; сохранение вручную — основное.
 * ========================================================= */

/* Карточка «Показать на карте»: заметная, но не конкурирует
 * с основной зелёной кнопкой сохранения. */
.certificate-delivery-zone {
	margin-top: 6px;
	margin-bottom: 2px;
}

.certificate-delivery-zone__open {
	min-height: 68px;
	padding: 12px 15px 12px 12px;
	border: 1px solid rgba(120, 134, 94, .34);
	border-radius: 16px;
	box-shadow: none;
}

.certificate-delivery-zone__open:hover {
	
	border-color: rgba(120, 134, 94, .55);
}

.certificate-delivery-zone__open:focus-visible {
	outline: 3px solid rgba(120, 134, 94, .18);
	outline-offset: 2px;
}

.certificate-delivery-zone__open-icon {
	color: #6f7e57;
	background: #e7eddf;
}

.certificate-delivery-zone__open-title {
	color: #38402f;
	font-size: 14px;
	font-weight: 650;
}

.certificate-delivery-zone__open-subtitle {
	margin-top: 4px;
	color: #7d8378;
	font-size: 12px;
	line-height: 1.3;
}



/* Единственная основная кнопка под полями для ручного ввода адреса. */
[data-sert-address] [data-sert-save-address] {
	grid-column: 1 / -1;
	width: 100%;
	min-height: 52px;
	margin-top: 6px;
	
}

[data-sert-address] [data-sert-save-address]:hover {
	background: #69784f;
	border-color: #69784f;
}

[data-sert-address] [data-sert-save-address]:active {
	transform: translateY(1px);
}

[data-sert-address] [data-sert-save-address]:focus-visible {
	outline: 3px solid rgba(120, 134, 94, .20);
	outline-offset: 2px;
}

/* В модалке есть крестик, поэтому снизу оставляем одно ясное действие. */
.certificate-delivery-map-modal__actions {
	display: block;
	margin-top: 10px;
}

.certificate-delivery-map-modal__button--primary {
	width: 96%;
	
	border-radius: 40px;
	
}

/* Адрес под картой читается как выбранный результат, а не ещё одно поле. */

/* Предупреждение вне зоны — компактное и визуально связано с доставкой. */
.certificate-delivery-alert {
	margin: 8px 0 6px;
	padding: 14px 15px;
	background: #fbf5f1;
	border-color: rgba(151, 104, 82, .18);
	border-radius: 16px;
}

@media (max-width: 767px) {
	.certificate-delivery-zone__open {
		min-height: 64px;
		padding: 11px;
		border-radius: 14px;
	}

	.certificate-delivery-zone__open-subtitle {
		font-size: 11px;
	}

	[data-sert-address] [data-sert-save-address] {
		min-height: 50px;
		margin-top: 4px;
		
	}

	.certificate-delivery-map-modal__button--primary {
		        text-align: center;
        
        min-height: 30px;
	}
}
