/* ==================================================
   HARCHI KOLO Core — контекстная навигация
   ================================================== */

.hk-context-back-row {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0 0 14px;
}

.hk-context-back {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 7px;

	min-height: 44px;
	margin: 0;
	padding: 8px 13px 8px 10px;

	color: #123F2F;
	-webkit-text-fill-color: #123F2F;
	background: rgba(18, 63, 47, 0.045);
	border: 1px solid rgba(18, 63, 47, 0.16);
	border-radius: 11px;
	box-shadow: none;

	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: left;
	text-decoration: none;

	cursor: pointer;
	transition:
		color 0.18s ease,
		background-color 0.18s ease,
		border-color 0.18s ease,
		transform 0.18s ease;
}

.hk-context-back__icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	fill: currentColor;
	transition: transform 0.18s ease;
}

.hk-context-back:hover {
	color: #C79A2B;
	-webkit-text-fill-color: #C79A2B;
	background: rgba(199, 154, 43, 0.07);
	border-color: rgba(199, 154, 43, 0.48);
	transform: translateY(-1px);
}

.hk-context-back:hover .hk-context-back__icon {
	transform: translateX(-2px);
}

.hk-context-back:active {
	transform: translateY(0) scale(0.98);
}

.hk-context-back:focus {
	outline: none;
	box-shadow: none;
}

.hk-context-back:focus-visible {
	outline: 2px solid #C79A2B;
	outline-offset: 3px;
}

/* ==================================================
   Предупреждение о несохранённых изменениях
   ================================================== */

.hk-context-dialog[hidden] {
	display: none !important;
}

.hk-context-dialog {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 20px;
}

.hk-context-dialog__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 23, 18, 0.72);
	backdrop-filter: blur(3px);
}

.hk-context-dialog__panel {
	position: relative;
	z-index: 1;
	width: min(100%, 510px);
	padding: 34px 32px 30px;

	color: #123F2F;
	background: #ffffff;
	border: 1px solid rgba(18, 63, 47, 0.12);
	border-radius: 22px;
	box-shadow: 0 26px 75px rgba(8, 25, 18, 0.28);
	text-align: center;
}

.hk-context-dialog__close {
	position: absolute;
	top: 13px;
	right: 13px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	color: #123F2F;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.hk-context-dialog__close svg {
	width: 21px;
	height: 21px;
	fill: currentColor;
}

.hk-context-dialog__close:hover {
	color: #C79A2B;
	background: rgba(199, 154, 43, 0.08);
}

.hk-context-dialog__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 17px;
	color: #9A6D12;
	background: #FFF6DA;
	border-radius: 50%;
	font-size: 27px;
	font-weight: 800;
	line-height: 1;
}

.hk-context-dialog__panel h2 {
	margin: 0 0 11px;
	color: #123F2F;
	font-size: clamp(25px, 4vw, 31px);
	font-weight: 750;
	line-height: 1.18;
}

.hk-context-dialog__panel p {
	max-width: 390px;
	margin: 0 auto;
	color: #5A6C65;
	font-size: 16px;
	line-height: 1.55;
}

.hk-context-dialog__actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 11px;
	margin-top: 25px;
}

.hk-context-dialog__stay,
.hk-context-dialog__leave {
	min-height: 48px;
	margin: 0;
	padding: 10px 15px;
	border-radius: 11px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 750;
	line-height: 1.2;
	cursor: pointer;
}

.hk-context-dialog__stay {
	color: #123F2F;
	background: #ffffff;
	border: 1px solid rgba(18, 63, 47, 0.36);
}

.hk-context-dialog__stay:hover {
	color: #C79A2B;
	border-color: #C79A2B;
}

.hk-context-dialog__leave {
	color: #ffffff;
	-webkit-text-fill-color: #ffffff;
	background: #B33A3A;
	border: 1px solid #B33A3A;
}

.hk-context-dialog__leave:hover {
	color: #ffffff;
	-webkit-text-fill-color: #ffffff;
	background: #982E2E;
	border-color: #982E2E;
}

.hk-context-dialog__close:focus-visible,
.hk-context-dialog__stay:focus-visible,
.hk-context-dialog__leave:focus-visible {
	outline: 2px solid #C79A2B;
	outline-offset: 3px;
}

body.hk-context-dialog-open {
	overflow: hidden !important;
}

/* В кабинете на компьютере уже есть боковое меню — кнопка нужна на телефоне. */
@media (min-width: 783px) {
	.hk-context-back-row--account {
		display: none;
	}
}

@media (max-width: 782px) {
	.hk-context-back-row {
		margin-bottom: 12px;
	}

	.hk-context-back {
		min-height: 44px;
		font-size: 14px;
	}

	.hk-context-dialog {
		padding: 14px;
	}

	.hk-context-dialog__panel {
		padding: 32px 20px 22px;
		border-radius: 18px;
	}

	.hk-context-dialog__actions {
		grid-template-columns: 1fr;
	}
}


/* ==================================================
   Unified route combinations — Core 1.8.16
   ================================================== */
.hk-context-back-row--vendor,
.hk-context-back-row--messages,
.hk-context-back-row--messages-list,
.hk-context-back-row--my-listings {
	position: relative;
	z-index: 2;
}

@media (max-width: 782px) {
	.hk-context-back-row--vendor,
	.hk-context-back-row--messages,
	.hk-context-back-row--messages-list,
	.hk-context-back-row--my-listings,
	.hk-context-back-row--listing-edit,
	.hk-context-back-row--listing-submit {
		width: 100%;
	}
}


/* ==================================================
   Vendor profile back-button placement — Core 1.8.17
   ================================================== */
.hk-context-back-row--vendor {
	margin-bottom: 14px;
}

@media (max-width: 782px) {
	.hk-context-back-row--vendor {
		margin-bottom: 12px;
	}
}
