/* DentalRun Booking Portal
   Colors and fonts come from the site's own theme tokens (every DentalRun theme defines them), with fallbacks, so the
   portal takes each client's brand without a stylesheet of its own. Running text 17 px, small notes 15 to 16 px. */

.drb {
	--drb-ink: var(--text-on-light, #201858);
	--drb-deep: var(--bg-deep, #17113F);
	--drb-accent: var(--accent-deep, #6828A0);
	--drb-soft: var(--accent-bright, #C9A9EA);
	--drb-rgb: var(--bg-deep-rgb, 23, 17, 63);
	--drb-muted: rgba(var(--drb-rgb), .74);
	--drb-line: rgba(var(--drb-rgb), .14);
	--drb-error: #B42318;
	--drb-ease: var(--ease, cubic-bezier(.22, 1, .36, 1));
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	padding: 24px 16px;
	border: 0;
	background: transparent;
	color: var(--drb-ink);
	font-family: var(--font-body, Inter, system-ui, sans-serif);
	font-size: 17px;
	line-height: 1.5;
	overflow: auto;
}
.drb[open] { display: flex; align-items: center; justify-content: center; }
.drb::backdrop { background: rgba(var(--bg-deep-rgb, 23, 17, 63), .58); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.drb *, .drb *::before, .drb *::after { box-sizing: border-box; }
html.drb-lock { overflow: hidden; }

.drb__shell {
	position: relative;
	width: min(720px, 100%);
	max-height: calc(100dvh - 48px);
	overflow: auto;
	overscroll-behavior: contain;
	--drb-px: 32px; /* side and bottom padding, also read by the pinned Continue bar (.drb__dock) */
	--drb-pb: 36px;
	padding: 20px var(--drb-px) var(--drb-pb);
	border-radius: 28px;
	background: var(--grad-light, linear-gradient(180deg, #E6DAF4 0%, #F4EFFA 55%, #FFFFFF 100%));
	box-shadow: 0 40px 90px -30px rgba(var(--drb-rgb), .65);
}
.drb[open] .drb__shell { animation: drb-pop .38s var(--drb-ease); }
@keyframes drb-pop { from { opacity: 0; transform: translateY(18px) scale(.98); } }

/* Top row: back, step count, close; then the progress line. */
.drb__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 48px; }
.drb__count { grid-column: 2; margin: 0; font-size: 15px; font-weight: 600; color: var(--drb-muted); letter-spacing: .02em; }
.drb__back, .drb__close, .drb__tile, .drb__pill, .drb__cta, .drb__textlink {
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.drb__back {
	grid-column: 1;
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 14px 0 4px;
	border: 0;
	border-radius: 999px;
	background: none;
	color: var(--drb-ink);
	font-size: 16px;
	font-weight: 600;
}
.drb__back::before { content: ""; width: 9px; height: 9px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 8px; }
.drb__back[hidden] { display: none; }
.drb__close {
	grid-column: 3;
	justify-self: end;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--drb-line);
	border-radius: 50%;
	background: #fff;
	color: var(--drb-ink);
	font-size: 26px;
	line-height: 1;
}

.drb__bar { height: 4px; margin: 10px 0 28px; border-radius: 4px; background: rgba(var(--drb-rgb), .1); overflow: hidden; }
.drb__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad-button, linear-gradient(94deg, var(--drb-accent), var(--drb-soft))); transition: width .45s var(--drb-ease); }
.drb.is-done .drb__bar { opacity: 0; }

/* Words */
.drb__eyebrow { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--drb-accent); }
.drb__title {
	margin: 0 0 8px;
	font-family: var(--font-display, Inter, system-ui, sans-serif);
	font-weight: 500;
	font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.45rem);
	line-height: 1.12;
	letter-spacing: -.01em;
	color: var(--drb-ink);
	outline: none;
}
.drb__lead { margin: 0 0 22px; font-size: 17px; color: var(--drb-muted); }
.drb__note { margin: 18px 0 0; font-size: 15px; line-height: 1.5; color: var(--drb-muted); }
.drb__note a, .drb a:not(.drb__cta) { color: var(--drb-accent); text-decoration: underline; text-underline-offset: 3px; }
.drb__step.is-in { animation: drb-in .34s var(--drb-ease); }
@keyframes drb-in { from { opacity: 0; transform: translateY(10px); } }
.drb__title + .drb__tiles { margin-top: 22px; }

/* Big tap tiles */
.drb__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.drb__tiles--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drb__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 148px;
	padding: 20px 14px 18px;
	border: 1px solid var(--drb-line);
	border-radius: 22px;
	background: #fff;
	color: var(--drb-ink);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	transition: border-color .2s, box-shadow .25s var(--drb-ease), transform .25s var(--drb-ease), background-color .2s, color .2s;
}
.drb__tile--text { min-height: 96px; }
.drb__icon { display: block; width: 56px; height: 56px; color: var(--drb-accent); transition: color .2s; }
.drb__icon svg { display: block; width: 100%; height: 100%; }
.drb__tile[aria-pressed="true"] { background: var(--drb-deep); border-color: var(--drb-deep); color: #fff; }
.drb__tile[aria-pressed="true"] .drb__icon { color: var(--drb-soft); }

/* Pills: other treatments, days and times */
.drb__more { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--drb-line); }
.drb__more .drb__lead { margin-bottom: 14px; }
.drb__pills { display: flex; flex-wrap: wrap; gap: 10px; }
.drb__pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 20px;
	border: 1px solid rgba(var(--drb-rgb), .2);
	border-radius: 999px;
	background: #fff;
	color: var(--drb-ink);
	font-size: 16px;
	font-weight: 500;
	transition: background-color .2s, color .2s, border-color .2s;
}
.drb__pill[aria-pressed="true"] { background: var(--drb-deep); border-color: var(--drb-deep); color: #fff; }
.drb__pill--wide { width: 100%; margin-bottom: 14px; font-weight: 600; }

.drb__days { border-top: 1px solid var(--drb-line); }
.drb__day { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--drb-line); }
.drb__dayname { margin: 0; font-weight: 600; font-size: 17px; }
.drb__dayname small { display: block; font-size: 15px; font-weight: 400; color: var(--drb-muted); }
.drb__dayparts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.drb__dayparts .drb__pill { width: 100%; }

/* Buttons that move on */
.drb__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	margin-top: 24px;
	padding: 0 34px;
	border: 0;
	border-radius: 999px;
	background: var(--drb-deep);
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s, transform .2s var(--drb-ease), opacity .2s;
}
.drb__cta:disabled { opacity: .38; cursor: not-allowed; transform: none; background: var(--drb-deep); }
.drb__cta--call { width: 100%; background: var(--drb-accent); font-size: 19px; min-height: 64px; }
/* Days and times can be taller than the screen (six open days on a phone). Continue stays pinned to the bottom of the
   panel, so a patient who picked a time always sees the way on. The bar paints the same background as the panel,
   lined up from the bottom (--drb-h is the panel height, set by booking.js), so it reads as part of the panel; the
   days fade out under its top edge. */
.drb__dock {
	position: sticky;
	bottom: calc(-1 * var(--drb-pb)); /* browsers measure from inside the panel's padding; this reaches its real bottom edge */
	z-index: 1;
	margin: 4px calc(-1 * var(--drb-px)) calc(-1 * var(--drb-pb));
	padding: 20px var(--drb-px) var(--drb-pb);
	background: var(--grad-light, linear-gradient(180deg, #E6DAF4 0%, #F4EFFA 55%, #FFFFFF 100%)) left bottom / 100% var(--drb-h, 100vh) no-repeat;
	-webkit-mask-image: linear-gradient(to bottom, transparent, #000 20px);
	mask-image: linear-gradient(to bottom, transparent, #000 20px);
}
.drb__dock .drb__cta { margin-top: 0; }
.drb__textlink { display: block; margin: 16px 0 0; padding: 8px 0; border: 0; background: none; color: var(--drb-ink); font-size: 16px; text-decoration: underline; text-underline-offset: 3px; text-align: left; }

/* Contact fields */
.drb__fields { display: grid; gap: 16px; margin-top: 22px; }
.drb__fields label { display: grid; gap: 6px; font-size: 16px; font-weight: 600; color: var(--drb-ink); }
.drb__opt { font-weight: 400; color: var(--drb-muted); }
.drb__fields input {
	width: 100%;
	min-height: 54px;
	padding: 0 16px;
	border: 1px solid rgba(var(--drb-rgb), .2);
	border-radius: 14px;
	background: #fff;
	color: var(--drb-ink);
	font: inherit;
	font-size: 17px;
}
.drb__fields input::placeholder { color: rgba(var(--drb-rgb), .45); }
.drb__fields input:focus { outline: 2px solid var(--drb-accent); outline-offset: 0; border-color: transparent; }
.drb__fields input[aria-invalid="true"] { border-color: var(--drb-error); }
.drb__status { margin: 12px 0 0; min-height: 1.4em; font-size: 16px; font-weight: 500; color: var(--drb-error); }
.drb__status:empty { min-height: 0; }

/* Hover only where there is a mouse: on phones a tapped tile would stay lifted */
@media (hover: hover) {
	.drb__back:hover { color: var(--drb-accent); }
	.drb__close:hover { border-color: var(--drb-ink); }
	.drb__tile:hover { border-color: rgba(var(--drb-rgb), .4); transform: translateY(-2px); box-shadow: 0 16px 30px -20px rgba(var(--drb-rgb), .55); }
	.drb__pill:hover { border-color: var(--drb-ink); }
	.drb__cta:hover:not(:disabled) { background: var(--drb-accent); color: #fff; transform: translateY(-1px); }
	.drb__cta--call:hover { background: var(--drb-deep); }
}

/* Keyboard focus, always visible */
.drb button:focus-visible, .drb a:focus-visible { outline: 3px solid var(--drb-accent); outline-offset: 2px; }

/* Field robots fill in, people never see */
.drb__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Phones: the panel fills the screen */
@media (max-width: 640px) {
	.drb { padding: 0; }
	.drb[open] { align-items: stretch; }
	.drb__shell { --drb-px: 18px; --drb-pb: calc(28px + env(safe-area-inset-bottom)); width: 100%; max-height: none; min-height: 100%; border-radius: 0; padding: 12px var(--drb-px) var(--drb-pb); }
	.drb__bar { margin-bottom: 22px; }
	.drb__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.drb__tile { min-height: 128px; padding: 16px 10px 14px; font-size: 16px; }
	.drb__tile--text { min-height: 84px; }
	.drb__icon { width: 48px; height: 48px; }
	.drb__day { grid-template-columns: 1fr; gap: 8px; }
	.drb__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.drb[open] .drb__shell, .drb__step.is-in { animation: none; }
	.drb__tile, .drb__bar span, .drb__cta { transition: none; }
}

/* 0.1.2: "Other" with a short field under the Something else list */
/* 0.1.2: the Something else list is compact, so a longer list stays about 4 rows on a phone (Ahmad, Nov 10) */
.drb__more .drb__pills { gap: 8px; }
.drb__more .drb__pill { min-height: 44px; padding: 0 14px; font-size: 15px; }
.drb__other { margin-top: 18px; }
.drb__other .drb__cta { margin-top: 0; }
