/* RentCafe tour scheduler. Fonts come from the theme; colors are variables. */

.rca-tour {
	--rt-accent: #ff7350;
	--rt-accent-ink: #ffffff;
	--rt-teal: #3d8f97;
	--rt-ink: #222222;
	--rt-muted: #646c72;
	--rt-line: #dde2e4;
	--rt-surface: #ffffff;
	--rt-soft: #f6f7f7;
	--rt-radius: 10px;

	color: var(--rt-ink);
	font: inherit;
	line-height: 1.5;
	max-width: 760px;
}

.rca-tour *, .rca-tour *::before, .rca-tour *::after { box-sizing: border-box; }
.rca-tour [hidden] { display: none !important; }

.rca-tour-title { margin: 0 0 6px; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
.rca-tour-intro { margin: 0 0 24px; color: var(--rt-muted); }

.rca-tour-label {
	margin: 0 0 10px;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rt-teal);
}

.rca-tour-step { margin: 0 0 28px; }

/* ---------- Tour type ---------- */

.rca-tour-types {
	display: inline-flex;
	padding: 4px;
	margin: 0 0 24px;
	background: var(--rt-soft);
	border-radius: 100px;
}

.rca-tour-types label { position: relative; cursor: pointer; }
.rca-tour-types input { position: absolute; opacity: 0; pointer-events: none; }

.rca-tour-types span {
	display: block;
	padding: 9px 18px;
	border-radius: 100px;
	font-weight: 600;
	font-size: 0.9375rem;
	transition: background .2s, color .2s;
}

.rca-tour-types input:checked + span { background: var(--rt-accent); color: var(--rt-accent-ink); }
.rca-tour-types input:focus-visible + span { outline: 2px solid var(--rt-accent); outline-offset: 2px; }

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

.rca-tour-cal {
	max-width: 380px;
	padding: 16px;
	background: var(--rt-surface);
	border: 1.5px solid var(--rt-line);
	border-radius: var(--rt-radius);
}

.rca-tour-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.rca-tour-cal-month { margin: 0; font-weight: 700; font-size: 1.0625rem; }

.rca-tour-cal-nav {
	width: 36px;
	height: 36px;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	color: var(--rt-ink);
	background: none;
	border: 1.5px solid var(--rt-line);
	border-radius: 50%;
	cursor: pointer;
}

.rca-tour-cal-nav:hover:not(:disabled) { border-color: var(--rt-accent); color: var(--rt-accent); }
.rca-tour-cal-nav:disabled { opacity: .3; cursor: default; }

.rca-tour-cal-week,
.rca-tour-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.rca-tour-cal-week span {
	padding: 4px 0;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
	color: var(--rt-muted);
}

.rca-tour-cal-grid .rca-tour-loading,
.rca-tour-cal-grid .rca-tour-empty { grid-column: 1 / -1; }

.rca-tour-day {
	position: relative;
	aspect-ratio: 1;
	padding: 0;
	font: inherit;
	font-size: 0.9375rem;
	color: #b7bdc0;
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: default;
}

.rca-tour-day.is-open {
	font-weight: 700;
	color: var(--rt-ink);
	cursor: pointer;
	transition: background .2s, color .2s;
}

/* A small dot under days that have times */
.rca-tour-day.is-open::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 16%;
	width: 4px;
	height: 4px;
	margin-left: -2px;
	border-radius: 50%;
	background: var(--rt-accent);
}

.rca-tour-day.is-open:hover { background: #fdece6; }

.rca-tour-day.is-selected,
.rca-tour-day.is-selected:hover { background: var(--rt-accent); color: var(--rt-accent-ink); }
.rca-tour-day.is-selected::after { background: var(--rt-accent-ink); }

/* ---------- Times ---------- */

.rca-tour-times {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 8px;
}

.rca-tour-time {
	min-height: 44px;
	padding: 8px;
	font: inherit;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--rt-ink);
	background: var(--rt-surface);
	border: 1.5px solid var(--rt-line);
	border-radius: 100px;
	cursor: pointer;
	transition: border-color .2s, background .2s, color .2s;
}

.rca-tour-time:hover { border-color: var(--rt-accent); }
.rca-tour-time.is-selected { background: var(--rt-accent); border-color: var(--rt-accent); color: var(--rt-accent-ink); }

.rca-tour-day:focus-visible,
.rca-tour-time:focus-visible,
.rca-tour-cal-nav:focus-visible,
.rca-tour-submit:focus-visible,
.rca-tour-ics:focus-visible {
	outline: 2px solid var(--rt-accent);
	outline-offset: 2px;
}

/* ---------- Form ---------- */

.rca-tour-picked {
	display: inline-block;
	margin: 0 0 16px;
	padding: 6px 12px;
	font-weight: 600;
	color: var(--rt-teal);
	background: #edf5f5;
	border-radius: 100px;
}

.rca-tour-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 16px;
	margin-bottom: 14px;
}

.rca-tour-grid label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 0.875rem;
	font-weight: 600;
}

.rca-tour-wide { grid-column: 1 / -1; }
.rca-tour-opt { font-weight: 400; color: var(--rt-muted); }

.rca-tour-grid input,
.rca-tour-grid select,
.rca-tour-grid textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	font: inherit;
	font-weight: 400;
	font-size: 1rem;
	color: var(--rt-ink);
	background: var(--rt-surface);
	border: 1.5px solid var(--rt-line);
	border-radius: 8px;
	transition: border-color .2s;
}

.rca-tour-grid input:focus,
.rca-tour-grid select:focus,
.rca-tour-grid textarea:focus { outline: none; border-color: var(--rt-teal); }

.rca-tour-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 18px;
	font-size: 0.8125rem;
	color: var(--rt-muted);
}

.rca-tour-check input { margin-top: 3px; accent-color: var(--rt-accent); }

.rca-tour-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rca-tour-error {
	margin: 0 0 14px;
	padding: 10px 14px;
	font-size: 0.9375rem;
	color: #8a2a12;
	background: #fdeee9;
	border-radius: 8px;
}

.rca-tour-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 28px;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	color: var(--rt-accent-ink);
	background: var(--rt-accent);
	border: 0;
	border-radius: 100px;
	cursor: pointer;
	transition: filter .2s;
}

.rca-tour-submit:hover { filter: brightness(1.06); }
.rca-tour-submit.is-busy { opacity: .7; cursor: progress; }

.rca-tour-fine { margin: 12px 0 0; font-size: 0.75rem; color: var(--rt-muted); }
.rca-tour-fine a { color: inherit; }

.rca-tour-loading,
.rca-tour-empty { margin: 0; padding: 18px 0; color: var(--rt-muted); }
.rca-tour-empty a { color: var(--rt-teal); font-weight: 600; }

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

.rca-tour-done {
	padding: 32px 28px;
	text-align: center;
	background: var(--rt-soft);
	border-radius: var(--rt-radius);
	outline: none;
	animation: rca-tour-in .4s ease-out;
}

@keyframes rca-tour-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.rca-tour-check-icon {
	display: inline-grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-bottom: 12px;
	color: #fff;
	background: var(--rt-teal);
	border-radius: 50%;
}

.rca-tour-done-when { margin: 0 0 6px; font-size: 1.25rem; font-weight: 700; }
.rca-tour-done-msg { margin: 0 0 18px; color: var(--rt-muted); }

.rca-tour-ics {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	font-weight: 600;
	color: var(--rt-accent);
	border: 1.5px solid var(--rt-accent);
	border-radius: 100px;
	text-decoration: none;
}

.rca-tour-ics:hover { background: var(--rt-accent); color: var(--rt-accent-ink); }

@media (max-width: 600px) {
	.rca-tour-grid { grid-template-columns: 1fr; }
	.rca-tour-cal { max-width: none; }
	.rca-tour-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.rca-tour * { transition: none !important; animation: none !important; }
}

/* ---------- Floating button ---------- */

.rca-tour-fab {
	position: fixed;
	right: max(20px, env(safe-area-inset-right));
	bottom: max(20px, env(safe-area-inset-bottom));
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 54px;
	padding: 0 22px 0 18px;
	font-family: Outfit, Arial, sans-serif;
	font-weight: 700;
	font-size: 1rem;
	color: #fff;
	background: #ff7350;
	border: 0;
	border-radius: 100px;
	box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .12);
	cursor: pointer;
	transition: transform .25s ease, box-shadow .25s ease, opacity .2s;
	animation: rca-fab-in .5s cubic-bezier(.2, .8, .2, 1) .6s both;
}

.rca-tour-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(0, 0, 0, .4), 0 2px 6px rgba(0, 0, 0, .12); }
.rca-tour-fab:focus-visible { outline: 3px solid #3d8f97; outline-offset: 3px; }
.rca-tour-launcher.is-open .rca-tour-fab { opacity: 0; pointer-events: none; }

@keyframes rca-fab-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Slide-in panel ---------- */

.rca-tour-panel {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(480px, 100vw);
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: #fff;
	box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .35);
	overflow: hidden;
	transform: translateX(100%);
	transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}

.rca-tour-panel::backdrop {
	background: rgba(16, 22, 26, 0);
	transition: background .32s;
}

.rca-tour-launcher.is-open .rca-tour-panel { transform: none; }
.rca-tour-launcher.is-open .rca-tour-panel::backdrop { background: rgba(16, 22, 26, .45); }
.rca-tour-launcher.is-closing .rca-tour-panel { transform: translateX(100%); }

.rca-tour-panel-body {
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: max(28px, env(safe-area-inset-top)) 28px max(32px, env(safe-area-inset-bottom));
}

.rca-tour-panel .rca-tour { max-width: none; }
.rca-tour-panel .rca-tour-title { padding-right: 44px; }
.rca-tour-panel .rca-tour-cal { max-width: none; }
.rca-tour-panel .rca-tour-grid { grid-template-columns: 1fr; }

.rca-tour-panel-close {
	position: absolute;
	top: max(16px, env(safe-area-inset-top));
	right: 16px;
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	font-size: 26px;
	line-height: 1;
	color: #222;
	background: #f2f4f4;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.rca-tour-panel-close:hover { background: #e6eaea; }
.rca-tour-panel-close:focus-visible { outline: 2px solid #ff7350; outline-offset: 2px; }

html.rca-tour-locked { overflow: hidden; }

/* Phones: the panel rises from the bottom as a sheet */
@media (max-width: 600px) {
	.rca-tour-fab {
		min-height: 50px;
		padding: 0 18px 0 14px;
		font-size: 0.9375rem;
	}

	.rca-tour-panel {
		inset: auto 0 0 0;
		width: 100vw;
		height: 92vh;
		height: 92dvh;
		border-radius: 18px 18px 0 0;
		transform: translateY(100%);
		box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .35);
	}

	.rca-tour-launcher.is-closing .rca-tour-panel { transform: translateY(100%); }
	.rca-tour-panel-body { padding: 26px 20px max(28px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
	.rca-tour-fab, .rca-tour-panel, .rca-tour-panel::backdrop { transition: none !important; animation: none !important; }
}
