/**
 * Единый блок «Способ оказания и место» (просмотр и компактные варианты).
 * Переменные совпадают с витриной / страницей заказа.
 */
:root {
	--hb-del-primary: var(--primary-color, #7b2ff2);
	--hb-del-text: var(--text-primary, #2d3748);
	--hb-del-muted: var(--text-secondary, #718096);
	--hb-del-border: var(--border-color, #e2e8f0);
	--hb-del-bg-soft: var(--background-gray, #f7fafc);
	--hb-del-card: var(--background-light, #ffffff);
	--hb-del-radius-lg: 2rem;
	--hb-del-radius: 1rem;
	--hb-del-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
	--hb-del-shadow-md: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.08));
}

/* ─── Полная карточка (страница заказа) ─── */
.hb-delivery-panel {
	margin-top: 1.5rem;
	background: linear-gradient(180deg, rgba(123, 47, 242, 0.04) 0%, var(--hb-del-card) 48%);
	border: 1px solid rgba(123, 47, 242, 0.12);
	border-radius: var(--hb-del-radius-lg);
	box-shadow: var(--hb-del-shadow);
	overflow: hidden;
	box-sizing: border-box;
}

.hb-delivery-panel__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1.125rem 1.25rem 0.875rem;
	border-bottom: 1px solid rgba(226, 232, 240, 0.85);
	background: rgba(255, 255, 255, 0.65);
}

.hb-delivery-panel__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.875rem;
	background: rgba(123, 47, 242, 0.12);
	color: var(--hb-del-primary);
	font-size: 1.2rem;
	flex-shrink: 0;
}

.hb-delivery-panel__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--hb-del-text);
	line-height: 1.25;
}

.hb-delivery-panel__body {
	padding: 1rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.hb-delivery-row {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid rgba(226, 232, 240, 0.65);
}

.hb-delivery-row:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.hb-delivery-row__ic {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--hb-del-bg-soft);
	color: var(--hb-del-muted);
	font-size: 0.95rem;
	margin-top: 0.05rem;
}

.hb-delivery-row__text {
	min-width: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.hb-delivery-row__label {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hb-del-muted);
}

.hb-delivery-row__value {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--hb-del-text);
	line-height: 1.45;
	word-break: break-word;
}

.hb-delivery-panel__map {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.hb-delivery-panel__map-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--hb-del-muted);
	margin: 0 0 0.65rem;
}

.hb-delivery-panel__map-title i {
	color: var(--hb-del-primary);
	font-size: 1rem;
}

.hb-delivery-map,
.order-detail-map.hb-delivery-map {
	width: 100%;
	height: 220px;
	min-height: 180px;
	border-radius: var(--hb-del-radius);
	overflow: hidden;
	background: var(--hb-del-bg-soft);
	border: 1px solid var(--hb-del-border);
	box-sizing: border-box;
}

@media (max-width: 576px) {
	.hb-delivery-map,
	.order-detail-map.hb-delivery-map {
		height: 200px;
	}
}

/* ─── Компактная плашка (чат / списки) ─── */
.hb-delivery-panel--compact {
	margin-top: 0;
	border-radius: var(--hb-del-radius);
	box-shadow: none;
	background: var(--hb-del-bg-soft);
	border: 1px solid var(--hb-del-border);
}

.hb-delivery-panel--compact .hb-delivery-panel__head {
	padding: 0.65rem 0.85rem;
	border-bottom: 1px solid rgba(226, 232, 240, 0.9);
	background: transparent;
}

.hb-delivery-panel--compact .hb-delivery-panel__icon {
	width: 2rem;
	height: 2rem;
	font-size: 1rem;
	border-radius: 0.65rem;
}

.hb-delivery-panel--compact .hb-delivery-panel__title {
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hb-del-muted);
}

.hb-delivery-panel--compact .hb-delivery-panel__body {
	padding: 0.5rem 0.85rem 0.75rem;
	gap: 0;
}

.hb-delivery-panel--compact .hb-delivery-row {
	padding: 0.45rem 0;
	border-bottom-color: rgba(226, 232, 240, 0.8);
}

.hb-delivery-panel--compact .hb-delivery-row__ic {
	width: 1.65rem;
	height: 1.65rem;
	font-size: 0.85rem;
}

.hb-delivery-panel--compact .hb-delivery-row__label {
	font-size: 0.625rem;
}

.hb-delivery-panel--compact .hb-delivery-row__value {
	font-size: 0.8125rem;
	font-weight: 500;
}

.hb-delivery-panel--compact .hb-delivery-panel__map {
	margin-top: 0.65rem;
	padding-top: 0.65rem;
}

.hb-delivery-panel--compact .hb-delivery-map {
	height: 140px;
	min-height: 120px;
}

/* ─── Строка в карточке заказа в списке ─── */
.hb-delivery-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.65rem;
	margin-top: 0.5rem;
	padding: 0.45rem 0.65rem;
	background: var(--hb-del-bg-soft);
	border: 1px solid var(--hb-del-border);
	border-radius: var(--hb-del-radius);
	font-size: 0.8125rem;
	color: var(--hb-del-muted);
	line-height: 1.35;
}

.hb-delivery-inline__item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	color: var(--hb-del-text);
}

.hb-delivery-inline__item i {
	color: var(--hb-del-primary);
	font-size: 0.95rem;
}

.hb-delivery-inline__sep {
	color: var(--hb-del-border);
	font-weight: 400;
	user-select: none;
}

/* ─── Оболочка блока локации в модалке заказа услуги ─── */
.hb-delivery-location-shell {
	margin-top: 0.25rem;
	padding: 1rem 1.1rem;
	background: linear-gradient(180deg, rgba(123, 47, 242, 0.05) 0%, #fff 40%);
	border: 1px solid rgba(123, 47, 242, 0.14);
	border-radius: var(--hb-del-radius-lg);
	box-shadow: var(--hb-del-shadow);
	gap: 1rem !important;
}

.hb-delivery-location-shell > .som-field-label:first-child,
.hb-delivery-location-shell .som-field-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem !important;
	margin-bottom: 0.15rem;
}

.hb-delivery-location-shell > .som-field-label:first-child::before,
.hb-delivery-location-shell .service-order-field > .som-field-label::before {
	content: '';
	display: none;
}

.hb-delivery-location-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.25rem;
}

.hb-delivery-location-head i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 0.5rem;
	background: rgba(123, 47, 242, 0.12);
	color: var(--hb-del-primary);
	font-size: 1rem;
}

.hb-delivery-location-head span {
	font-size: 0.9375rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--hb-del-text);
}

/* Ссылка на карту в шапке чата */
.hb-delivery-chat-maplink {
	margin: 0.35rem 0 0;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.hb-delivery-chat-maplink a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--hb-del-primary);
	text-decoration: none;
}

.hb-delivery-chat-maplink a:hover {
	text-decoration: underline;
}

.freelance-chat-service-info .hb-delivery-panel--compact {
	margin-top: 0.5rem;
	width: 100%;
	max-width: 100%;
}

/* Заголовок шага «Способ и место» (модалка услуги, мастер заказа) */
.hb-service-delivery-step-head {
	border-color: rgba(123, 47, 242, 0.12) !important;
}

/* Модалка услуги: карточки-пояснения по способам */
#serviceModal .service-delivery-info-card {
	background: linear-gradient(180deg, rgba(123, 47, 242, 0.05) 0%, #fff 42%);
	border: 1px solid rgba(123, 47, 242, 0.14) !important;
	border-radius: 1.25rem !important;
	box-shadow: var(--hb-del-shadow);
}

#serviceModal .service-delivery-info-card > .fw-bold:first-child {
	font-size: 0.9375rem;
	font-weight: 800 !important;
	letter-spacing: -0.02em;
	color: var(--hb-del-text);
}

#serviceModal #locationSection {
	padding: 1.1rem 1.2rem;
	background: rgba(247, 250, 252, 0.85);
	border: 1px solid var(--hb-del-border);
	border-radius: var(--hb-del-radius-lg);
	box-shadow: var(--hb-del-shadow);
	margin-bottom: 1rem;
}

#serviceModal #locationSection .form-label {
	font-weight: 700;
	color: var(--hb-del-text);
}

#serviceModal .visit-radius-card {
	background: #fff;
	border: 1px solid rgba(123, 47, 242, 0.12) !important;
	border-radius: 1rem !important;
	box-shadow: var(--hb-del-shadow);
}

.hb-service-location-map {
	min-height: 260px;
}

/* Карточки «Мои услуги»: блок форматов как единая плашка */
#my-services-grid .service-delivery-wrap {
	padding: 0.5rem 0.65rem;
	background: var(--hb-del-bg-soft);
	border: 1px solid var(--hb-del-border);
	border-radius: var(--hb-del-radius);
	box-shadow: var(--hb-del-shadow);
}

/* ─── Страница просмотра услуги: сетка + карта в одной hb-delivery-panel ─── */
.hb-delivery-view-service-section {
	margin-top: 1.5rem;
}

.hb-delivery-panel--view-service {
	margin-top: 0;
}

.hb-delivery-panel__body--flush-top {
	padding-top: 0.75rem;
}

.hb-delivery-panel--view-service .hb-delivery-view-service-map-inner {
	margin-top: 1rem;
}

.hb-delivery-panel--view-service .service-detail-map.hb-delivery-map {
	height: 280px;
	min-height: 220px;
}

@media (max-width: 576px) {
	.hb-delivery-panel--view-service .service-detail-map.hb-delivery-map {
		height: 220px;
		min-height: 180px;
	}
}
