/* Support Chat Lite — viewport-fixed floating overlay (no document-flow footprint). */
.hp-support-chat {
	--hp-support-fab-size: 134px;
	--hp-support-offset-x: 28px;
	--hp-support-offset-y: 28px;
	--hp-support-panel-gap: 14px;
	--hp-support-panel-width: min(360px, calc(100vw - 56px));

	position: fixed !important;
	inset: auto var(--hp-support-offset-x) var(--hp-support-offset-y) auto !important;
	z-index: 2147483000;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	width: auto !important;
	height: auto !important;
	min-width: 0;
	min-height: 0;
	max-width: none;
	overflow: visible !important;
	pointer-events: none;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	isolation: isolate;
}

.hp-support-chat.is-dismissed {
	display: none !important;
}

.hp-support-chat__fab,
.hp-support-chat__panel {
	pointer-events: auto;
}

/* Launcher bubble */
.hp-support-chat__fab--icon,
.hp-support-chat__fab--default {
	width: var(--hp-support-fab-size);
	height: var(--hp-support-fab-size);
	min-width: var(--hp-support-fab-size);
	min-height: var(--hp-support-fab-size);
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
}

.hp-support-chat__fab--icon {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: none;
	display: block;
	line-height: 0;
	overflow: hidden;
}

.hp-support-chat__fab-icon {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	display: block;
	object-fit: contain;
	border: 0;
	border-radius: 50%;
	background: transparent;
	filter: drop-shadow(0 8px 24px rgba(15, 23, 42, 0.28));
	pointer-events: none;
}

.hp-support-chat__fab--default {
	border: 0;
	background: linear-gradient(145deg, #ed8b0b, #f59e0b);
	color: #fff;
	box-shadow: 0 8px 22px rgba(237, 139, 11, 0.36);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.hp-support-chat__fab--default:hover,
.hp-support-chat__fab--icon:hover {
	transform: translateY(-1px);
}

.hp-support-chat__fab-default-icon {
	width: calc(var(--hp-support-fab-size) * 0.46);
	height: calc(var(--hp-support-fab-size) * 0.46);
	display: block;
}

.hp-support-chat.is-open .hp-support-chat__fab {
	opacity: 0.92;
}

/* Panel — anchored above FAB inside fixed root (not a second fixed layer). */
.hp-support-chat__panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + var(--hp-support-panel-gap));
	width: var(--hp-support-panel-width);
	max-height: calc(100dvh - var(--hp-support-offset-y) - var(--hp-support-fab-size) - 24px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #d0d7de;
	border-radius: 16px;
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
	padding: 0;
}

.hp-support-chat__panel[hidden] {
	display: none !important;
}

.hp-support-chat__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	flex-shrink: 0;
	padding: 12px 12px 10px;
	border-bottom: 1px solid #e2e8f0;
	background: #fff;
}

.hp-support-chat__header h3 {
	margin: 0;
	padding-right: 4px;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
	color: #0f172a;
	flex: 1 1 auto;
	min-width: 0;
}

.hp-support-chat__header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.hp-support-chat__hide,
.hp-support-chat__close {
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	-webkit-appearance: none;
	appearance: none;
}

.hp-support-chat__hide {
	min-height: 32px;
	padding: 0 10px;
	background: #f8fafc;
	color: #475569;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid #e2e8f0;
	white-space: nowrap;
}

.hp-support-chat__hide:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.hp-support-chat__close {
	width: 32px;
	height: 32px;
	min-width: 32px;
	background: #f1f5f9;
	color: #0f172a;
	font-size: 20px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.hp-support-chat__close:hover {
	background: #e2e8f0;
}

/* External X — State B only (FAB visible, panel closed). Hidden when panel open or dismissed. */
.hp-support-chat__external-close {
	display: none;
	position: absolute;
	right: 0;
	bottom: calc(var(--hp-support-fab-size) + 10px);
	z-index: 5;
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #0f172a;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	pointer-events: auto;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
	-webkit-appearance: none;
	appearance: none;
}

.hp-support-chat:not(.is-dismissed):not(.is-open) .hp-support-chat__external-close {
	display: inline-flex;
}

.hp-support-chat__external-close:hover {
	background: #1e293b;
}

.hp-support-chat__external-close:focus-visible {
	outline: 2px solid #38bdf8;
	outline-offset: 2px;
}

.hp-support-chat__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 12px;
}

.hp-support-chat__choices {
	display: grid;
	gap: 8px;
}

.hp-support-chat__choices button,
.hp-support-chat__flow > button,
.hp-support-chat__flow > a:not(.hp-support-form__link) {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #d0d7de;
	background: #f8fafc;
	text-decoration: none;
	color: #0f172a;
	text-align: left;
	cursor: pointer;
	font: inherit;
	box-sizing: border-box;
}

.hp-support-chat__flow {
	display: grid;
	gap: 10px;
}

/* Compact support forms (B2B / traveller / guest) */
.hp-support-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
}

.hp-support-form__fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hp-support-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
}

.hp-support-field > label {
	font-size: 12px;
	font-weight: 600;
	color: #334155;
	line-height: 1.3;
}

.hp-support-field input {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #d0d7de;
	border-radius: 8px;
	box-sizing: border-box;
	font: inherit;
	font-size: 14px;
	line-height: 1.3;
	background: #fff;
}

.hp-support-check {
	margin: 0;
	padding: 9px 10px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.hp-support-check__label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	font-weight: 400;
	color: #334155;
	cursor: pointer;
}

.hp-support-check__label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	min-width: 16px;
	margin: 2px 0 0;
	flex-shrink: 0;
	accent-color: #ed8b0b;
}

.hp-support-check__text {
	flex: 1 1 auto;
	min-width: 0;
	word-break: break-word;
}

.hp-support-form__submit {
	width: 100%;
	padding: 11px 12px;
	border-radius: 10px;
	border: 0;
	background: linear-gradient(145deg, #ed8b0b, #f59e0b);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 2px;
}

.hp-support-form__submit:hover {
	filter: brightness(1.03);
}

.hp-support-form__link {
	display: block;
	font-size: 12px;
	line-height: 1.4;
	color: #0f172a;
	text-align: center;
	padding: 4px 0 0;
}

.hp-support-chat__flow .hp-support-hint {
	font-size: 13px;
	line-height: 1.45;
	color: #334155;
	margin: 0;
}

.hp-support-chat__flow .hp-support-partner-summary {
	font-size: 13px;
	line-height: 1.5;
	color: #0f172a;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 12px;
}

.hp-support-chat__flow .hp-support-error {
	font-size: 12px;
	color: #b91c1c;
	background: #fee2e2;
	padding: 8px 10px;
	border-radius: 8px;
	line-height: 1.4;
}

/* Backoffice — same FAB scale and z-index; only hides public selector */
.hp-support-chat--backoffice .hp-support-chat__choices {
	display: none !important;
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 481px) {
	.hp-support-chat {
		--hp-support-fab-size: 123px;
		--hp-support-offset-x: 24px;
		--hp-support-offset-y: 24px;
		--hp-support-panel-width: min(360px, calc(100vw - 48px));
	}
}

/* Mobile */
@media (max-width: 480px) {
	.hp-support-chat {
		--hp-support-fab-size: 101px;
		--hp-support-offset-x: 16px;
		--hp-support-offset-y: max(16px, env(safe-area-inset-bottom, 0px));
		--hp-support-panel-width: min(360px, calc(100vw - 32px));
		--hp-support-panel-gap: 12px;
	}

	.hp-support-chat__fab-icon {
		filter: drop-shadow(0 4px 14px rgba(15, 23, 42, 0.22));
	}

	.hp-support-chat__panel {
		max-height: calc(100dvh - var(--hp-support-offset-y) - var(--hp-support-fab-size) - 16px);
	}

	.hp-support-chat__body {
		padding: 10px;
	}

	.hp-support-field input {
		font-size: 16px; /* avoid iOS zoom */
	}
}
