/**
 * Havenlytics Pro — Schedule a Tour (frontend).
 * Isolated module stylesheet: single-property tour chrome + form states + card CTA.
 * Uses Havena Pro design tokens when present; loads only when Schedule Tour is gated on.
 * Scoped per form/card — supports multiple Schedule Tour instances.
 */

/* —— Property card CTA (listing archives) —— */
.havena-pro-property__cta--tour {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.havena-pro-property__cta--tour:hover,
.havena-pro-property__cta--tour:focus-visible {
	transform: translateY(-1px);
}

.havena-pro-property__cta--tour:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.havena-pro-property__cta--tour svg {
	flex-shrink: 0;
	width: 1em;
	height: 1em;
}

/* —— Single-property tour chrome (Havena presentation tokens) —— */
[data-havena-pro-tour-card] .havena-pro-tour__note {
	margin: -0.5rem 0 1rem;
	font-size: var(--havena-pro-fs-sm, 0.875rem);
	line-height: 1.45;
	color: #646970;
}

[data-havena-pro-tour-card] .havena-pro-tour__dates {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.55rem;
	margin-bottom: 1rem;
}

[data-havena-pro-tour-card] .havena-pro-tour__date {
	padding: 0.65rem 0.3rem;
	border: 1.5px solid var(--havena-pro-line, #dcdcde);
	border-radius: var(--havena-pro-radius-sm, 6px);
	text-align: center;
	font-size: var(--havena-pro-fs-xs, 0.75rem);
	font-weight: var(--havena-pro-type-weight-button, 600);
	color: var(--havena-pro-slate, #50575e);
	background: transparent;
	cursor: pointer;
	transition:
		background var(--havena-pro-speed-fast, 0.15s ease),
		border-color var(--havena-pro-speed-fast, 0.15s ease),
		color var(--havena-pro-speed-fast, 0.15s ease);
}

[data-havena-pro-tour-card] .havena-pro-tour__date strong {
	display: block;
	font-size: 1.15rem;
	color: var(--havena-pro-ink, #1d2327);
	line-height: 1.3;
}

[data-havena-pro-tour-card] .havena-pro-tour__date:hover {
	border-color: var(--havena-pro-blue, #2271b1);
}

[data-havena-pro-tour-card] .havena-pro-tour__date.is-active {
	background: var(--havena-pro-navy-900, #0a1628);
	border-color: var(--havena-pro-navy-900, #0a1628);
	color: rgba(255, 255, 255, 0.7);
}

[data-havena-pro-tour-card] .havena-pro-tour__date.is-active strong {
	color: var(--havena-pro-gold, #c9a227);
}

@media (max-width: 420px) {
	[data-havena-pro-tour-card] .havena-pro-tour__dates {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* —— Native form interaction / feedback —— */
form[data-havena-pro-schedule-tour] .havena-pro-tour__field-label {
	display: block;
	margin: 0 0 0.35rem;
	font-size: var(--havena-pro-fs-xs, 0.75rem);
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--havena-pro-slate, #50575e);
}

form[data-havena-pro-schedule-tour] .havena-pro-input,
form[data-havena-pro-schedule-tour] .havena-pro-textarea,
form[data-havena-pro-schedule-tour] .havena-pro-select-wrap,
form[data-havena-pro-schedule-tour] .havena-pro-tour__field {
	margin-bottom: 0.65rem;
}

form[data-havena-pro-schedule-tour].is-submitting {
	opacity: 0.72;
	pointer-events: none;
}

form[data-havena-pro-schedule-tour].is-submitting .js-hvnly-contact-agent-submit {
	cursor: wait;
}

form[data-havena-pro-schedule-tour] .js-hvnly-contact-agent-feedback {
	margin: 0.5rem 0 0.75rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

form[data-havena-pro-schedule-tour] .js-hvnly-contact-agent-feedback.is-error,
form[data-havena-pro-schedule-tour] .js-hvnly-contact-agent-feedback.hvnly-contact-agent__feedback--error {
	color: #b32d2e;
}

form[data-havena-pro-schedule-tour] .js-hvnly-contact-agent-feedback.is-success,
form[data-havena-pro-schedule-tour] .js-hvnly-contact-agent-feedback.hvnly-contact-agent__feedback--success {
	color: #00a32a;
}

form[data-havena-pro-schedule-tour] .js-hvnly-contact-agent-submit:focus-visible,
[data-havena-pro-tour-card] .havena-pro-tour__date:focus-visible,
form[data-havena-pro-schedule-tour] select:focus-visible,
form[data-havena-pro-schedule-tour] input:focus-visible,
form[data-havena-pro-schedule-tour] textarea:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* —— External open + embed chrome (mode-based; provider-agnostic) —— */
[data-havena-pro-tour-card] .havena-pro-tour__external-cta {
	margin-top: 0.25rem;
}

[data-havena-pro-tour-card] .havena-pro-tour__embed-fallback {
	margin: 0;
}

[data-havena-pro-tour-card][data-havena-pro-tour-mode="embed"] .havena-pro-tour__embed {
	margin: 0 0 0.75rem;
	border-radius: var(--havena-pro-radius-sm, 8px);
	overflow: hidden;
	border: 1px solid var(--havena-pro-line, rgba(15, 23, 42, 0.1));
	background: #fff;
	min-height: 620px;
}

[data-havena-pro-tour-card][data-havena-pro-tour-mode="embed"] .havena-pro-tour__embed iframe {
	display: block;
	width: 100%;
	min-height: 620px;
	height: 620px;
	border: 0;
}

@media (max-width: 640px) {
	[data-havena-pro-tour-card][data-havena-pro-tour-mode="embed"] .havena-pro-tour__embed,
	[data-havena-pro-tour-card][data-havena-pro-tour-mode="embed"] .havena-pro-tour__embed iframe {
		min-height: 700px;
		height: 700px;
	}
}
