/*
 * Header hotline shortcode and popup.
 */

.camap-header-hotline,
.camap-header-hotline__dialog {
	--camap-hotline-primary: #e60019;
	--camap-hotline-primary-dark: #c90016;
	--camap-hotline-surface: #fff1f2;
	--camap-hotline-text: #334155;
	--camap-hotline-muted: #64748b;
	--camap-hotline-danger: #e60019;
	--camap-hotline-border: rgba(15, 23, 42, 0.1);
}

.camap-header-hotline {
	display: inline-flex;
	align-items: center;
}

.camap-header-hotline__trigger {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: currentColor;
	font: inherit;
	font-weight: 700;
	line-height: 1.12;
	text-align: left;
	cursor: pointer;
	text-transform: none;
}

.camap-header-hotline__trigger:hover,
.camap-header-hotline__trigger:focus {
	color: currentColor;
	background: transparent;
	box-shadow: none;
}

.camap-header-hotline__trigger:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.78);
	outline-offset: 4px;
	border-radius: 6px;
}

.camap-header-hotline__trigger-icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	flex: 0 0 24px;
}

.camap-header-hotline__trigger-icon svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.camap-header-hotline__trigger-text {
	display: grid;
	gap: 1px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.08;
}

.camap-header-hotline__dialog[hidden] {
	display: none;
}

.camap-header-hotline__dialog {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	color: var(--camap-hotline-text);
}

.camap-header-hotline__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 7, 18, 0.86);
}

.camap-header-hotline__panel {
	position: relative;
	width: min(720px, calc(100vw - 32px));
	max-height: min(88vh, 760px);
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 22px 64px rgba(0, 0, 0, 0.28);
}

.camap-header-hotline__panel-header {
	position: relative;
	display: flex;
	min-height: 64px;
	align-items: center;
	justify-content: center;
	padding: 14px 56px;
	background: var(--camap-hotline-primary, #e60019);
	color: #fff;
}

.camap-header-hotline__title {
	margin: 0;
	color: inherit;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.25;
	text-align: center;
	text-transform: uppercase;
}

.camap-header-hotline__close {
	position: absolute;
	top: 50%;
	right: 8px;
	display: inline-flex;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	transform: translateY(-50%);
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-size: 34px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	padding: 0;
}

.camap-header-hotline__close:hover,
.camap-header-hotline__close:focus {
	background: transparent;
	color: #fff;
	box-shadow: none;
	outline: 0;
}

.camap-header-hotline__body {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	max-height: calc(min(88vh, 760px) - 64px);
	overflow: auto;
	padding: 16px;
	background: #fff;
}

.camap-header-hotline__branch {
	padding: 16px;
	border-radius: 10px;
	background: var(--camap-hotline-surface);
}

.camap-header-hotline__branch-title,
.camap-header-hotline__section-title {
	margin: 0 0 10px;
	padding-bottom: 9px;
	border-bottom: 1px solid var(--camap-hotline-border);
	color: var(--camap-hotline-primary);
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
	text-transform: uppercase;
}

.camap-header-hotline__section {
	margin-top: 28px;
}

.camap-header-hotline__section-title {
	color: var(--camap-hotline-text);
	font-size: 15px;
}

.camap-header-hotline__phones {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.camap-header-hotline__phone-link {
	display: grid;
	grid-template-columns: 20px max-content minmax(0, 1fr);
	gap: 9px;
	align-items: center;
	color: var(--camap-hotline-text);
	text-decoration: none;
}

.camap-header-hotline__phone-link:hover .camap-header-hotline__phone-number,
.camap-header-hotline__phone-link:focus .camap-header-hotline__phone-number {
	color: var(--camap-hotline-primary-dark);
}

.camap-header-hotline__phone-icon {
	display: inline-flex;
	width: 20px;
	height: 20px;
	align-items: center;
	justify-content: center;
	color: var(--camap-hotline-primary);
}

.camap-header-hotline__phone-icon svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.camap-header-hotline__phone-number {
	color: var(--camap-hotline-danger);
	font-size: 19px;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.camap-header-hotline__phone-note {
	min-width: 0;
	color: var(--camap-hotline-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
}

.camap-header-hotline__branch--empty {
	grid-column: 1 / -1;
}

.camap-header-hotline__empty {
	margin: 0;
	color: var(--camap-hotline-muted);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

body.camap-header-hotline-open {
	overflow: hidden;
}

.off-canvas .camap-header-hotline,
.mobile-sidebar .camap-header-hotline {
	display: flex;
	width: 100%;
}

.off-canvas .camap-header-hotline__trigger,
.mobile-sidebar .camap-header-hotline__trigger {
	width: 100%;
	min-height: 42px;
	gap: 9px;
	color: var(--sicomp-text, #111827);
}

.off-canvas .camap-header-hotline__trigger-icon,
.mobile-sidebar .camap-header-hotline__trigger-icon {
	width: 18px;
	height: 18px;
	flex-basis: 18px;
	color: var(--camap-hotline-primary);
}

.off-canvas .camap-header-hotline__trigger-icon svg,
.mobile-sidebar .camap-header-hotline__trigger-icon svg {
	width: 18px;
	height: 18px;
}

.off-canvas .camap-header-hotline__trigger-text,
.mobile-sidebar .camap-header-hotline__trigger-text {
	display: inline-flex;
	gap: 4px;
	align-items: center;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

@media (max-width: 549px) {
	.camap-header-hotline__dialog {
		align-items: stretch;
		padding: 0;
	}

	.camap-header-hotline__panel {
		width: 100%;
		max-width: none;
		max-height: none;
		min-height: 100vh;
		min-height: 100dvh;
		border-radius: 0;
	}

	.camap-header-hotline__panel-header {
		min-height: 64px;
		padding: calc(13px + env(safe-area-inset-top, 0px)) 42px 13px 18px;
	}

	.camap-header-hotline__title {
		font-size: 16px;
		text-align: center;
	}

	.camap-header-hotline__close {
		right: 0;
		width: 42px;
		height: 38px;
		font-size: 32px;
	}

	.camap-header-hotline__body {
		grid-template-columns: 1fr;
		max-height: calc(100vh - 64px);
		max-height: calc(100dvh - 64px - env(safe-area-inset-top, 0px));
		padding: 12px;
		background: #fff;
	}

	.camap-header-hotline__branch {
		padding: 14px;
		background: #fff3f4;
	}

	.camap-header-hotline__branch-title {
		font-size: 16px;
	}

	.camap-header-hotline__section-title {
		color: #374151;
	}

	.camap-header-hotline__phone-number {
		font-size: 17px;
	}

	.camap-header-hotline__phone-note {
		font-size: 13px;
	}
}
