/* Track Booking widget. Scoped under .tb so Bootstrap 3 and site styles do not leak in or out. */

.tb {
	--tb-ink: #2b2f33;
	--tb-muted: #5f686d;
	--tb-faint: #a3adb1;
	--tb-ground: #ffffff;
	--tb-panel: #f4f8f8;
	--tb-rule: #e2eaea;
	--tb-accent: #23827a;
	--tb-accent-hover: #1b6a63;
	--tb-band: #e3f4f2;
	--tb-error: #b3261e;
	--tb-error-bg: #fcefee;
	--tb-radius: 6px;
	--tb-ease: cubic-bezier(0.22, 1, 0.36, 1);

	font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--tb-ink);
	-webkit-font-smoothing: antialiased;
	font-variant-numeric: tabular-nums;
	margin: 0 0 32px;
}

.tb *,
.tb *::before,
.tb *::after { box-sizing: border-box; }

.tb [hidden] { display: none !important; }

.tb ::selection { background: var(--tb-band); color: var(--tb-ink); }

.tb svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

.tb button { font-family: inherit; }

.tb :focus { outline: none; }
.tb :focus-visible {
	outline: 2px solid var(--tb-accent);
	outline-offset: 2px;
}

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

/* ---------- Stay summary ---------- */

.tb-stay {
	display: flex;
	border: 1px solid var(--tb-rule);
	border-radius: var(--tb-radius) var(--tb-radius) 0 0;
	background: var(--tb-ground);
}

.tb-stay-cell {
	flex: 1 1 0;
	min-width: 0;
	padding: 12px 16px 13px;
	border-left: 1px solid var(--tb-rule);
}
.tb-stay-cell:first-child { border-left: 0; }
.tb-stay-nights { flex: 0 0 84px; }

.tb-stay-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tb-muted);
}

.tb-stay-value {
	display: block;
	margin-top: 2px;
	font-size: 17px;
	font-weight: 300;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--tb-muted);
	transition: color 200ms var(--tb-ease);
}
.tb-stay-value.is-set { color: var(--tb-ink); font-weight: 400; }
.tb-stay-cell.is-active { box-shadow: inset 0 -2px 0 var(--tb-accent); }

/* ---------- Calendar ---------- */

.tb-calendar {
	border: 1px solid var(--tb-rule);
	border-top: 0;
	border-radius: 0 0 var(--tb-radius) var(--tb-radius);
	padding: 12px 16px 14px;
	background: var(--tb-ground);
}

.tb-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}

.tb-cal-hint {
	margin: 0;
	font-size: 13px;
	color: var(--tb-muted);
	text-align: center;
}

.tb-cal-hint.is-warning { color: var(--tb-error); }

.tb-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: transparent;
	color: var(--tb-ink);
	cursor: pointer;
	transition: background-color 150ms var(--tb-ease), color 150ms var(--tb-ease);
}
.tb-icon-btn:hover { background: var(--tb-panel); }
.tb-icon-btn:disabled { color: var(--tb-rule); cursor: default; background: transparent; }

.tb-months {
	display: flex;
	gap: 28px;
}

.tb-month { flex: 1 1 0; min-width: 0; }

.tb-month-title {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	letter-spacing: 0.02em;
}

.tb-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	row-gap: 2px;
}

.tb-dow {
	padding: 4px 0 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
	color: var(--tb-muted);
}

.tb-day {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	max-height: 44px;
	min-height: 34px;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 14px;
	font-weight: 500;
	color: var(--tb-ink);
	cursor: pointer;
	z-index: 0;
}

/* The circle sits on a pseudo element so the range band can run edge to edge behind it. */
.tb-day::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 38px;
	height: 38px;
	max-width: 100%;
	max-height: 100%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	z-index: -1;
	transition: background-color 150ms var(--tb-ease), box-shadow 150ms var(--tb-ease);
}

.tb-day:hover::after { box-shadow: inset 0 0 0 1px var(--tb-ink); }
.tb-day.is-today { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.tb-day.is-unavailable,
.tb-day.is-past {
	color: var(--tb-faint);
	cursor: default;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}
.tb-day.is-past { text-decoration: none; color: #c6cdd0; }
.tb-day.is-unavailable:hover::after,
.tb-day.is-past:hover::after,
.tb-day.is-blocked:hover::after { box-shadow: none; }

/* Valid only as a check-out (the night before is open, this night is not). */
.tb-day.is-checkout-only { color: var(--tb-ink); text-decoration: none; }

/* Inside the minimum stay while choosing check-out. */
.tb-day.is-blocked { color: var(--tb-faint); cursor: default; }

.tb-day.in-range { background: var(--tb-band); color: var(--tb-ink); text-decoration: none; }
.tb-day.is-start { background: linear-gradient(90deg, transparent 50%, var(--tb-band) 50%); }
.tb-day.is-end { background: linear-gradient(90deg, var(--tb-band) 50%, transparent 50%); }
.tb-day.is-start.is-end { background: transparent; }
.tb-day.is-start,
.tb-day.is-end { color: #fff; font-weight: 600; text-decoration: none; }
.tb-day.is-start::after,
.tb-day.is-end::after { background: var(--tb-accent); box-shadow: none; }

.tb-day.is-preview { background: var(--tb-panel); }
.tb-day.is-preview-end::after { box-shadow: inset 0 0 0 1px var(--tb-accent); }

.tb-day:focus-visible { outline: none; }
.tb-day:focus-visible::after { box-shadow: 0 0 0 2px var(--tb-ground), 0 0 0 4px var(--tb-accent); }

.tb-blank { aspect-ratio: 1 / 1; max-height: 44px; min-height: 34px; }

.tb-cal-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 18px;
	margin-top: 10px;
	font-size: 12px;
	color: var(--tb-muted);
}
.tb-cal-foot .tb-link { margin-left: auto; }

.tb-key { display: inline-flex; align-items: center; gap: 7px; }
.tb-key-swatch { width: 12px; height: 12px; border-radius: 50%; }
.tb-key-unavailable { background: linear-gradient(135deg, transparent 45%, var(--tb-faint) 45%, var(--tb-faint) 55%, transparent 55%); box-shadow: inset 0 0 0 1px var(--tb-rule); }
.tb-key-selected { background: var(--tb-accent); }

/* Skeleton month while availability loads */
.tb-skeleton .tb-month-title { width: 40%; margin: 0 auto 12px; border-radius: 4px; background: var(--tb-panel); }
.tb-skeleton .tb-grid { gap: 6px; }
.tb-skeleton .tb-grid span { aspect-ratio: 1 / 1; max-height: 38px; border-radius: 50%; background: var(--tb-panel); animation: tb-pulse 1.4s ease-in-out infinite; }

@keyframes tb-pulse { 50% { opacity: 0.45; } }

/* ---------- Guests ---------- */

.tb-guests {
	margin: 28px 0 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.tb-section-title,
.tb-form-title {
	display: block;
	width: auto;
	margin: 0 0 6px;
	padding: 0;
	border: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tb-ink);
	line-height: 1.4;
}

.tb-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 0;
	border-bottom: 1px solid var(--tb-rule);
}

.tb-stepper-label { font-size: 15px; font-weight: 500; }
.tb-stepper-label small { display: block; font-size: 12px; font-weight: 400; color: var(--tb-muted); }

.tb-stepper-control { display: flex; align-items: center; gap: 4px; }
.tb-stepper-control output {
	display: inline-block;
	min-width: 32px;
	font-size: 16px;
	text-align: center;
}

.tb-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--tb-rule);
	border-radius: 50%;
	background: var(--tb-ground);
	color: var(--tb-ink);
	cursor: pointer;
	transition: border-color 150ms var(--tb-ease), color 150ms var(--tb-ease);
}
.tb-step svg { width: 16px; height: 16px; }
.tb-step:hover { border-color: var(--tb-ink); }
.tb-step:disabled { color: var(--tb-rule); border-color: var(--tb-rule); cursor: default; }

.tb-note { margin: 8px 0 0; font-size: 12px; color: var(--tb-muted); }

/* ---------- Price ---------- */

.tb-price {
	margin-top: 28px;
	padding: 20px 20px 18px;
	border-radius: var(--tb-radius);
	background: var(--tb-panel);
}

.tb-price-loading span {
	display: block;
	height: 14px;
	margin: 0 0 14px;
	border-radius: 4px;
	background: var(--tb-rule);
	animation: tb-pulse 1.4s ease-in-out infinite;
}
.tb-price-loading span:nth-child(2) { width: 82%; }
.tb-price-loading span:nth-child(3) { width: 68%; }
.tb-price-loading span:nth-child(4) { width: 100%; height: 44px; margin: 22px 0 0; }

.tb-lines { margin: 0; }

.tb-line {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 5px 0;
}
.tb-line dt { font-weight: 400; color: var(--tb-ink); }
.tb-line dd { margin: 0; white-space: nowrap; }

.tb-line-discount dd { color: var(--tb-accent); }

.tb-line-total {
	margin-top: 10px;
	padding-top: 14px;
	border-top: 1px solid var(--tb-rule);
	align-items: baseline;
}
.tb-line-total dt { font-weight: 600; }
.tb-line-total dd { font-size: 26px; font-weight: 300; letter-spacing: -0.01em; }

.tb-disclose {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--tb-ink);
	font-size: inherit;
	text-decoration: underline;
	text-decoration-color: var(--tb-faint);
	text-underline-offset: 3px;
	cursor: pointer;
}
.tb-disclose svg { width: 16px; height: 16px; transition: transform 200ms var(--tb-ease); }
.tb-disclose[aria-expanded="true"] svg { transform: rotate(180deg); }
.tb-disclose:hover { text-decoration-color: currentColor; }

.tb-itemized {
	margin: 2px 0 6px;
	padding: 4px 0 4px 14px;
	border-left: 1px solid var(--tb-rule);
	font-size: 13px;
	color: var(--tb-muted);
}
.tb-itemized .tb-line { padding: 2px 0; }
.tb-itemized .tb-line dt { color: var(--tb-muted); }

.tb-schedule { margin-top: 6px; font-size: 13px; color: var(--tb-muted); }
.tb-schedule .tb-line { padding: 2px 0; }
.tb-schedule .tb-line dt { color: var(--tb-muted); }
.tb-schedule .tb-line:first-child dt,
.tb-schedule .tb-line:first-child dd { color: var(--tb-ink); font-weight: 600; }

.tb-promo { margin: 16px 0 18px; font-size: 13px; }
.tb-promo-form { display: flex; gap: 8px; margin-top: 8px; }
.tb-promo-form .tb-input { flex: 1 1 auto; text-transform: uppercase; letter-spacing: 0.04em; }
.tb-promo-applied { margin: 0; display: flex; align-items: center; gap: 12px; color: var(--tb-muted); }
.tb-line-discount dt { display: inline-flex; align-items: baseline; gap: 12px; }
.tb-line-discount .tb-link { font-size: 13px; }

.tb-policy { margin: 12px 0 0; font-size: 12px; color: var(--tb-muted); text-align: center; }
.tb-policy:empty { display: none; }

/* ---------- Buttons & links ---------- */

.tb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--tb-radius);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 150ms var(--tb-ease), border-color 150ms var(--tb-ease), color 150ms var(--tb-ease);
}
.tb-btn-block { display: flex; width: 100%; }

.tb-btn-primary { background: var(--tb-accent); color: #fff; min-height: 52px; font-size: 15px; }
.tb-btn-primary:hover { background: var(--tb-accent-hover); color: #fff; }
.tb-btn-primary:disabled { background: var(--tb-faint); cursor: progress; }

.tb-btn-quiet { background: var(--tb-ground); border-color: var(--tb-rule); color: var(--tb-ink); }
.tb-btn-quiet:hover { border-color: var(--tb-ink); }

.tb-btn .tb-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: tb-spin 800ms linear infinite;
}
@keyframes tb-spin { to { transform: rotate(360deg); } }

.tb-link {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--tb-accent);
	font-size: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(35, 130, 122, 0.35);
	text-underline-offset: 3px;
	cursor: pointer;
}
.tb-link:hover { color: var(--tb-accent-hover); text-decoration-color: currentColor; }

/* ---------- Forms ---------- */

.tb-form { margin-top: 32px; }
.tb-form-title { margin: 28px 0 12px; }
.tb-form-title:first-child { margin-top: 0; }
.tb-form-lede { margin: -4px 0 16px; font-size: 14px; color: var(--tb-muted); }
.tb-form-lede strong { color: var(--tb-ink); font-weight: 600; }

.tb-row { display: flex; gap: 12px; }
.tb-row > .tb-field { flex: 1 1 0; min-width: 0; }

.tb-field { margin-bottom: 14px; }
.tb-field label {
	display: block;
	margin: 0 0 5px;
	font-size: 13px;
	font-weight: 500;
	color: var(--tb-ink);
}
.tb-hint { font-weight: 400; color: var(--tb-muted); }

.tb-input {
	display: block;
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #848f93;
	border-radius: var(--tb-radius);
	background: var(--tb-ground);
	color: var(--tb-ink);
	font-family: inherit;
	font-size: 16px; /* 16px stops iOS zooming on focus */
	box-shadow: none;
	caret-color: var(--tb-accent);
	transition: border-color 150ms var(--tb-ease), box-shadow 150ms var(--tb-ease);
	-webkit-appearance: none;
	appearance: none;
}
.tb-input::placeholder { color: var(--tb-muted); }
.tb-input:hover { border-color: var(--tb-muted); }
.tb-input:focus { border-color: var(--tb-accent); box-shadow: 0 0 0 3px rgba(35, 130, 122, 0.16); outline: none; }
.tb-input.is-invalid { border-color: var(--tb-error); }
.tb-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.14); }
.tb-input-card { letter-spacing: 0.06em; }

.tb-select {
	padding-right: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b2f33' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px 16px;
}

.tb-textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.5; resize: vertical; }

.tb-field-error { display: block; margin-top: 5px; font-size: 12px; color: var(--tb-error); }

.tb-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 8px 0 18px;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
}
.tb-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--tb-accent); }
.tb-check.is-invalid span { color: var(--tb-error); }

.tb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tb-alert {
	margin: 0 0 14px;
	padding: 11px 14px;
	border-radius: var(--tb-radius);
	font-size: 14px;
}
.tb-alert-error { background: var(--tb-error-bg); color: var(--tb-error); }
.tb-calendar .tb-alert { margin: 12px 0 0; }
.tb-price .tb-alert { margin: 0; }

.tb-secure {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--tb-muted);
}
.tb-secure svg { width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Done states ---------- */

.tb-done {
	margin-top: 28px;
	padding: 28px 24px;
	border-radius: var(--tb-radius);
	background: var(--tb-panel);
	text-align: center;
}
.tb-done:focus { outline: none; }
.tb-done > svg {
	width: 44px;
	height: 44px;
	padding: 10px;
	border-radius: 50%;
	background: var(--tb-accent);
	color: #fff;
	stroke-width: 2;
}
.tb-done h3 { margin: 14px 0 6px; font-family: inherit; font-size: 19px; font-weight: 500; color: var(--tb-ink); }
.tb-done p { margin: 0 0 10px; font-size: 14px; color: var(--tb-muted); }

/* ---------- Narrow columns ---------- */

@media (max-width: 420px) {
	.tb-stay-cell { padding: 10px 12px 11px; }
	.tb-stay-value { font-size: 15px; }
	.tb-stay-nights { flex-basis: 64px; }
	.tb-calendar { padding: 10px 10px 12px; }
	.tb-row:not(.tb-row-keep) { flex-direction: column; gap: 0; }
	.tb-price { padding: 18px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.tb *,
	.tb *::before,
	.tb *::after { transition: none !important; animation: none !important; }
}
