/**
 * HomeRunner Toolkit — AI-Ready guest entry point.
 *
 * Theme-neutral: inherits the site's fonts and colors, draws its own
 * structure only. Overridable through the custom properties on the section
 * (the accent pair is also set inline from the module's accent setting).
 *
 * No opacity dimming anywhere: on an unknown theme background a dimmed text
 * color cannot be shown to pass contrast. In-page text inherits the theme's
 * color at full strength; the dialog owns its surface, so it uses fixed
 * colors measured against it. Logical properties throughout (RTL).
 */
.hrtk-aic-guest {
	/* Fixed accent pair so hover never becomes white-on-white on a dark
	   theme (currentColor + #fff did). Both are overridable by the theme. */
	--hrtk-aic-accent: #1d4ed8;
	--hrtk-aic-on-accent: #fff;
	--hrtk-aic-border: rgba(0, 0, 0, 0.12);
	--hrtk-aic-surface: rgba(0, 0, 0, 0.03);
	--hrtk-aic-radius: 12px;
	box-sizing: border-box;
	margin: 2.5rem 0;
	padding: 1.75rem 1.5rem;
	border: 1px solid var(--hrtk-aic-border);
	border-radius: var(--hrtk-aic-radius);
	background: var(--hrtk-aic-surface);
}

.hrtk-aic-guest *,
.hrtk-aic-guest *::before,
.hrtk-aic-guest *::after {
	box-sizing: inherit;
}

.hrtk-aic-guest__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hrtk-aic-guest__heading {
	margin: 0 0 1rem;
}

.hrtk-aic-guest__context {
	margin: -0.5rem 0 1.25rem;
	font-size: 0.9em;
}

.hrtk-aic-guest__copy {
	margin: 0 0 0.5rem;
	padding-inline-start: 1.2em;
}

.hrtk-aic-guest__copy li {
	margin: 0 0 0.35rem;
}

.hrtk-aic-guest__note {
	margin: 0 0 1.25rem;
	padding-inline-start: 1.2em;
	font-size: 0.9em;
}

.hrtk-aic-guest__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.hrtk-aic-guest__links li {
	margin: 0;
}

/* Layout for every button; the look only when the theme's own button
   classes are not in charge (--theme adds uk-button uk-button-default). */
.hrtk-aic-guest__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 44px;
	cursor: pointer;
}

.hrtk-aic-guest__btn:not(.hrtk-aic-guest__btn--theme) {
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--hrtk-aic-accent);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.hrtk-aic-guest__btn:not(.hrtk-aic-guest__btn--theme):hover {
	background: var(--hrtk-aic-accent);
	color: var(--hrtk-aic-on-accent);
}

/* The ring is drawn in the text color, which contrasts with the surface it
   sits on by definition; a fixed ring color cannot promise that. */
.hrtk-aic-guest__btn:focus-visible,
.hrtk-aic-trigger:focus-visible,
.hrtk-aic-guest-footer__link:focus-visible,
.hrtk-aic-dialog__close:focus-visible,
.hrtk-aic-guest__prompt-wrap summary:focus-visible,
.hrtk-aic-guest__prompt:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Hovered AND keyboard-focused: the fill is the accent and currentColor is
   the on-accent text, so a ring in currentColor sat on the white surface
   outside the button and vanished. A double ring: the accent outside, the
   on-accent inside; one of the two contrasts with whatever is next to it. */
.hrtk-aic-guest__btn:not(.hrtk-aic-guest__btn--theme):hover:focus-visible {
	outline-color: var(--hrtk-aic-accent);
	box-shadow: inset 0 0 0 2px var(--hrtk-aic-on-accent);
}

.hrtk-aic-guest__btn-sub {
	font-weight: 400;
}

a.hrtk-aic-guest__btn:not(.hrtk-aic-guest__btn--theme)::after {
	content: "";
	flex: none;
	width: 0.8em;
	height: 0.8em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M5 2h7v7M12 2L5.5 8.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M5 2h7v7M12 2L5.5 8.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hrtk-aic-guest__btn--small:not(.hrtk-aic-guest__btn--theme) {
	padding: 0.4rem 0.9rem;
	font-size: 0.9em;
}

.hrtk-aic-guest__btn--small {
	margin: 0.5rem 0;
}

.hrtk-aic-guest__prompt-wrap {
	margin: 0 0 1rem;
	/* The script scrolls the opened disclosure into view: clear of a sticky
	   header above, and of the fixed bottom bars it measured below. */
	scroll-margin-block-start: 96px;
	scroll-margin-block-end: calc(var(--hrtk-aic-bottom-bar, 0px) + env(safe-area-inset-bottom, 0px) + 16px);
}

/* A 44px target from padding alone: a list-item summary does not center its
   text inside a min-height, which left the line sitting high in the row. */
.hrtk-aic-guest__prompt-wrap summary {
	padding-block: 10px;
	line-height: 24px;
	cursor: pointer;
	font-weight: 600;
}

.hrtk-aic-guest__prompt {
	margin: 0.5rem 0 0;
	padding: 1rem;
	border: 1px solid var(--hrtk-aic-border);
	border-radius: calc(var(--hrtk-aic-radius) / 2);
	background: #fff;
	color: #222;
	font-size: 0.85em;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
	user-select: all;
	-webkit-user-select: all;
	/* A reference box, not a page of text: the full prompt runs to some 40
	   lines on a phone, which pushed everything else out of the sheet. */
	max-height: min(20rem, 45vh);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.hrtk-aic-guest__trust {
	margin: 0;
	font-weight: 600;
}

.hrtk-aic-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Relocated section (moved into the theme layout by aic-guest-entry.js):
   a content-width wrapper so it lines up with the builder's own sections. */
.hrtk-aic-guest-wrap {
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

.hrtk-aic-guest-wrap > .hrtk-aic-guest {
	margin: 0;
}

/* Content-path section that is a direct child of the main landmark: the
   same box as the relocated wrapper produces (its 1200px minus 20px side
   padding = 1160px, auto margins, 20px gutters), so both placements match. */
main > .hrtk-aic-guest,
#tm-main > .hrtk-aic-guest,
[role="main"] > .hrtk-aic-guest {
	box-sizing: border-box;
	width: calc(100% - 40px);
	max-width: 1160px;
	margin: 40px auto;
}

.hrtk-aic-guest-footer {
	padding: 0.75rem 1rem;
	text-align: center;
	font-size: 0.9em;
}

/* Not relocated (no JS, or no footer found; "0" = the script gave up and
   revealed it in place): a plain white strip. */
.hrtk-aic-guest-footer:not([data-hrtk-aic-relocated="1"]) {
	background: #fff;
	color: #222;
}

/* Relocated into the theme footer: inherit its colours. */
.hrtk-aic-guest-footer[data-hrtk-aic-relocated="1"] {
	background: transparent;
	color: inherit;
	font-size: 0.85em;
	padding: 0.75rem 1rem 0;
}

.hrtk-aic-guest-footer__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding-block: 0.6rem;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.hrtk-aic-guest-footer[data-hrtk-aic-relocated="1"] .hrtk-aic-guest-footer__link {
	color: currentColor;
}

/* The script swaps the link for a <button> that opens the dialog (it keeps
   the class): reset the button chrome so it still reads as the same link.
   :where() keeps the reset below the rules above. */
:where(button.hrtk-aic-guest-footer__link) {
	margin: 0;
	padding-inline: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

/* Adopted by the explorer mobile sheet: the end of the sheet's list. */
.hrtk-aic-in-sheet.hrtk-aic-guest-wrap,
.hrtk-aic-in-sheet.hrtk-aic-guest {
	max-width: none;
	margin: 0;
	padding: 16px;
}

.hrtk-aic-in-sheet.hrtk-aic-guest-footer {
	padding-block-end: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.hrtk-aic-guest-main {
	max-width: 52rem;
	margin: 0 auto;
	padding: 2rem 1rem 3rem;
}

/* ------------------------------------------------------------------ trigger
   An item of the property page's action row, next to Share: it takes the
   row's own type (font, size, case, color) and only adds the icon. The
   resets below sit in :where() (zero specificity) so any class the operator
   puts on it (uk-button uk-button-link, the theme's own link classes) wins
   over them: on demo Share is 15px semibold, on lakefront uppercase, and
   the trigger must match whichever it sits next to, not impose one look.
   The script swaps the link for a <button>, so button chrome is reset too. */
:where(.hrtk-aic-trigger) {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.hrtk-aic-trigger[hidden] {
	display: none;
}

/* The icon and the label. The builder element puts UIkit's uk-link-* class
   here (under uk-link-toggle on the trigger), so the theme colors both. */
.hrtk-aic-trigger__inner {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	/* Never broken mid-label: beside a long back link on a phone the whole
	   item drops under the row (the theme's grid wraps it) instead. */
	white-space: nowrap;
}

.hrtk-aic-trigger__icon {
	flex: none;
	width: 1.25em;
	height: 1.25em;
}

/* The theme's toggle pair brings its own hover; underline only without it. */
.hrtk-aic-trigger:not(.uk-link-toggle):hover .hrtk-aic-trigger__label {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* The page scroll lock while the dialog is open. A class with !important, so
   another script resetting inline overflow on <html> (UIkit's modal cleanup)
   cannot undo it. */
html.hrtk-aic-lock {
	overflow: hidden !important;
}

/* ------------------------------------------------------------------- dialog
   A native <dialog>: a centered card on desktop, a bottom sheet at phone
   width. It owns its surface (white), so its colors are fixed and measured:
   #1f2933 on #fff is 14.9:1, the muted #52606d is 6.4:1. */
.hrtk-aic-dialog {
	box-sizing: border-box;
	width: min(600px, calc(100vw - 32px));
	max-width: none;
	max-height: min(85vh, 760px);
	max-height: min(85dvh, 760px);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 16px;
	background: #fff;
	color: #1f2933;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.hrtk-aic-dialog:not([open]) {
	display: none;
}

/* The container is not a control; focus lands on the close button inside. */
.hrtk-aic-dialog:focus {
	outline: none;
}

.hrtk-aic-dialog::backdrop {
	background: rgba(2, 24, 38, 0.55);
}

.hrtk-aic-dialog__panel {
	box-sizing: border-box;
	position: relative;
	max-height: inherit;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 32px 36px 28px;
}

.hrtk-aic-dialog__handle {
	display: none;
}

.hrtk-aic-dialog__close {
	position: absolute;
	inset-block-start: 14px;
	inset-inline-end: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f4f6;
	color: #1f2933;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.hrtk-aic-dialog__close:hover {
	background: #e3e8ec;
}

.hrtk-aic-dialog .hrtk-aic-guest {
	--hrtk-aic-border: #d5dce1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 16px;
	align-items: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
}

.hrtk-aic-dialog .hrtk-aic-guest > * {
	grid-column: 1 / -1;
}

.hrtk-aic-dialog .hrtk-aic-guest__eyebrow {
	justify-self: start;
	margin: 0 0 14px;
	padding: 6px 10px;
	border-radius: 12px;
	background: #eaf4f7;
	color: #12475a;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.14em;
}

.hrtk-aic-dialog .hrtk-aic-guest__heading {
	margin: 0 0 8px;
	padding-inline-end: 48px;
	color: inherit;
	font-size: 1.625rem;
	line-height: 1.15;
}

.hrtk-aic-dialog .hrtk-aic-guest__context {
	margin: 0 0 20px;
	color: #52606d;
	font-size: 0.875rem;
}

.hrtk-aic-dialog .hrtk-aic-guest__copy {
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.hrtk-aic-dialog .hrtk-aic-guest__copy li {
	position: relative;
	margin: 0 0 10px;
	padding-inline-start: 30px;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.hrtk-aic-dialog .hrtk-aic-guest__copy li::before {
	content: "";
	position: absolute;
	inset-block-start: 0.1em;
	inset-inline-start: 0;
	width: 20px;
	height: 22px;
	background: var(--hrtk-aic-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 22' fill='none'%3E%3Cpath d='M4 11.5l4 4 8-9' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 22' fill='none'%3E%3Cpath d='M4 11.5l4 4 8-9' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hrtk-aic-dialog .hrtk-aic-guest__note {
	margin: 0 0 22px;
	padding-inline-start: 30px;
	color: #52606d;
	font-size: 0.8125rem;
	line-height: 1.45;
}

.hrtk-aic-dialog .hrtk-aic-guest__links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 16px;
}

.hrtk-aic-dialog .hrtk-aic-guest__links .hrtk-aic-guest__btn {
	width: 100%;
	min-height: 46px;
}

.hrtk-aic-dialog .hrtk-aic-guest__btn:not(.hrtk-aic-guest__btn--theme) {
	border-width: 1.5px;
	background: #fff;
	color: #1f2933;
	font-size: 0.9375rem;
	font-weight: 500;
}

.hrtk-aic-dialog .hrtk-aic-guest__btn:not(.hrtk-aic-guest__btn--theme):hover {
	background: var(--hrtk-aic-accent);
	color: var(--hrtk-aic-on-accent);
}

.hrtk-aic-dialog .hrtk-aic-guest__prompt-wrap {
	grid-column: 1;
	margin: 0;
}

.hrtk-aic-dialog .hrtk-aic-guest__prompt-wrap[open] {
	grid-column: 1 / -1;
	margin: 0 0 12px;
}

.hrtk-aic-dialog .hrtk-aic-guest__prompt-wrap summary {
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.hrtk-aic-dialog .hrtk-aic-guest__trust {
	grid-column: 2;
	justify-self: end;
	color: #1f2933;
	font-size: 0.875rem;
	text-align: end;
}

.hrtk-aic-dialog .hrtk-aic-guest__prompt-wrap[open] + .hrtk-aic-guest__status + .hrtk-aic-guest__trust {
	grid-column: 1 / -1;
}

@media (prefers-reduced-motion: no-preference) {
	.hrtk-aic-dialog[open] {
		animation: hrtk-aic-dialog-in 0.18s ease-out;
	}

	.hrtk-aic-dialog[open]::backdrop {
		animation: hrtk-aic-fade-in 0.18s ease-out;
	}
}

@keyframes hrtk-aic-dialog-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@keyframes hrtk-aic-fade-in {
	from {
		opacity: 0;
	}
}

@media (max-width: 640px) {
	/* The same dialog as a bottom sheet. */
	.hrtk-aic-dialog {
		width: 100%;
		max-height: 85vh;
		max-height: 85dvh;
		margin: auto 0 0;
		border-radius: 20px 20px 0 0;
	}

	.hrtk-aic-dialog__panel {
		padding: 12px 20px calc(28px + env(safe-area-inset-bottom, 0px));
	}

	.hrtk-aic-dialog__handle {
		display: block;
		width: 40px;
		height: 4px;
		margin: 0 auto 16px;
		border-radius: 2px;
		background: #c9d1d6;
	}

	.hrtk-aic-dialog__close {
		inset-block-start: 8px;
		inset-inline-end: 10px;
	}

	.hrtk-aic-dialog .hrtk-aic-guest__heading {
		font-size: 1.375rem;
	}

	.hrtk-aic-dialog .hrtk-aic-guest__copy li {
		font-size: 0.875rem;
	}

	.hrtk-aic-dialog .hrtk-aic-guest__links {
		grid-template-columns: minmax(0, 1fr);
	}

	.hrtk-aic-dialog .hrtk-aic-guest__prompt-wrap,
	.hrtk-aic-dialog .hrtk-aic-guest__trust {
		grid-column: 1 / -1;
		justify-self: start;
		text-align: start;
	}

	@media (prefers-reduced-motion: no-preference) {
		.hrtk-aic-dialog[open] {
			animation: hrtk-aic-sheet-in 0.22s ease-out;
		}
	}
}

@keyframes hrtk-aic-sheet-in {
	from {
		transform: translateY(100%);
	}
}

@media (max-width: 600px) {
	.hrtk-aic-guest {
		padding: 1.25rem 1rem;
	}

	.hrtk-aic-guest__links li,
	.hrtk-aic-guest__links .hrtk-aic-guest__btn {
		width: 100%;
	}
}

/* ------------------------------------------------- stay fields (WS3.11) */

.hrtk-aic-guest__stay {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--hrtk-aic-border);
	border-radius: calc(var(--hrtk-aic-radius) / 2);
	background: #fff;
	color: #222;
}

.hrtk-aic-guest__stay-lead {
	margin: 0 0 0.6rem;
	font-size: 0.9em;
}

.hrtk-aic-guest__stay-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

@media (min-width: 560px) {
	.hrtk-aic-guest__stay-grid {
		grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr;
	}
}

.hrtk-aic-guest__stay-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
	font-size: 0.85em;
	min-width: 0;
}

.hrtk-aic-guest__stay-label {
	font-weight: 600;
}

.hrtk-aic-guest__stay-input {
	width: 100%;
	min-height: 44px;
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--hrtk-aic-border);
	border-radius: calc(var(--hrtk-aic-radius) / 2);
	background: #fff;
	color: #222;
	font: inherit;
	box-sizing: border-box;
}

.hrtk-aic-guest__stay-input:focus-visible {
	outline: 2px solid var(--hrtk-aic-accent);
	outline-offset: 1px;
}

.hrtk-aic-guest__stay-status {
	margin: 0.5rem 0 0;
	min-height: 1.2em;
	font-size: 0.85em;
}

.hrtk-aic-guest__stay-status:empty {
	margin: 0;
	min-height: 0;
}
