/*
 * IR Booking widget — pill + 4-step modal.
 * Self-contained (own Montserrat @font-face) so it looks right on every page,
 * including non-home pages that don't load the full dark-theme style.css.
 *
 * NOTE: colors are hardcoded (not CSS custom properties). An earlier version
 * relied on var(--irb-*) tokens; if those failed to resolve in any context the
 * backgrounds collapsed to `transparent` and the page showed through (white
 * popup). Hardcoding guarantees the dark theme everywhere.
 *
 * Palette: orange #FF4D03 · orange-hover #ff5e1f · modal #1a1a1a · tile #222
 *          line #333 · ink #fff · muted #aaa · amber #f4b740 · red #ef4343
 */

/* ---------- Fonts (self-contained) ---------- */
@font-face {
	font-family: "Montserrat";
	src: url("fonts/Montserrat-Regular.otf") format("opentype");
	font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
	font-family: "Montserrat";
	src: url("fonts/Montserrat-Medium.otf") format("opentype");
	font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
	font-family: "Montserrat";
	src: url("fonts/Montserrat-Bold.otf") format("opentype");
	font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Box-sizing reset (scoped) ---------- */
.ir-book-pill,
.ir-book-overlay { box-sizing: border-box; }
.ir-book-overlay *,
.ir-book-overlay *::before,
.ir-book-overlay *::after { box-sizing: border-box; }

/* ============================================================
   PILL (fixed right edge, site-wide)
   ============================================================ */
.ir-book-pill {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 60;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 9px;
	border: none;
	border-radius: 10px 0 0 10px;
	background: #FF4D03;
	color: #fff;
	cursor: pointer;
	font-family: "Montserrat", system-ui, -apple-system, sans-serif;
	box-shadow: -4px 0 22px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, filter 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}
.ir-book-pill:hover {
	transform: translateY(-50%) scale(1.04);
	filter: brightness(1.06);
}
.ir-book-pill:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.ir-book-pill-icon { width: 20px; height: 20px; display: block; }
.ir-book-pill-label {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	line-height: 1;
}
.ir-book-pill-dot {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
}
.ir-book-pill-dot::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #fff;
	animation: irb-ripple 1.7s ease-out infinite;
}
@keyframes irb-ripple {
	0% { transform: scale(1); opacity: 0.7; }
	100% { transform: scale(3.2); opacity: 0; }
}

/* ============================================================
   OVERLAY + MODAL
   ============================================================ */
.ir-book-overlay {
	position: fixed;
	inset: 0;
	z-index: 9990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.85);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-family: "Montserrat", system-ui, -apple-system, sans-serif;
	animation: irb-fade 0.2s ease;
	overflow-y: auto;
}
.ir-book-overlay[hidden] { display: none; }
@keyframes irb-fade { from { opacity: 0; } to { opacity: 1; } }

.ir-book-modal {
	width: 100%;
	max-width: 600px;
	background: #1a1a1a;
	border: 1px solid rgba(255, 77, 3, 0.15);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
	max-height: calc(100vh - 40px);
	display: flex;
	flex-direction: column;
	color: #fff;
	animation: irb-rise 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes irb-rise { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Header strip (stays branded orange) ---------- */
.ir-book-header {
	background: #FF4D03;
	color: #fff;
	padding: 18px 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.ir-book-wordmark { font-weight: 700; font-size: 16px; letter-spacing: 0.06em; color: #fff; }
.ir-book-subtitle { font-size: 12.5px; opacity: 0.92; margin-top: 2px; color: #fff; }
.ir-book-close {
	background: rgba(0, 0, 0, 0.18);
	border: none;
	color: #fff;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
	flex-shrink: 0;
}
.ir-book-close:hover { background: #0a0a0a; color: #FF4D03; }

/* ---------- Progress dots ---------- */
.ir-book-progress {
	display: flex;
	gap: 8px;
	justify-content: center;
	padding: 16px 0 4px;
	flex-shrink: 0;
	background: #1a1a1a;
}
.ir-book-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #333;
	transition: background 0.25s, transform 0.25s;
}
.ir-book-dot.active { background: #FF4D03; transform: scale(1.15); }
.ir-book-dot.done { background: #FF4D03; opacity: 0.6; }

/* ---------- Body ---------- */
.ir-book-body {
	padding: 12px 26px 26px;
	overflow-y: auto;
	position: relative;
	background: #1a1a1a; /* explicit dark backstop — never let the page show through */
}
.ir-book-back {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: #fff;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 0;
	margin-bottom: 6px;
	font-family: inherit;
	transition: color 0.2s;
}
.ir-book-back:hover { color: #FF4D03; }
.ir-book-back[hidden] { display: none; }

.ir-book-step[hidden] { display: none; }
.ir-book-step h3 {
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 8px 0 6px;
}
.ir-book-step .ir-book-sub {
	color: #aaa;
	font-size: 14px;
	margin: 0 0 20px;
}

/* ---------- Tiles ---------- */
.ir-book-tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.ir-book-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 18px 16px;
	background: #222;
	border: 1px solid #333;
	border-radius: 8px;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
	min-height: 110px;
}
.ir-book-tile:hover,
.ir-book-tile.selected {
	border-color: #FF4D03;
	box-shadow: 0 0 0 1px #FF4D03, 0 4px 20px rgba(255, 77, 3, 0.15);
}
.ir-book-tile:active { transform: translateY(1px); }
.ir-book-tile:focus-visible { outline: 2px solid #FF4D03; outline-offset: 2px; }
.ir-book-tile-icon { width: 38px; height: 38px; color: #FF4D03; }
.ir-book-tile-icon svg { width: 100%; height: 100%; }
.ir-book-tile-title { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.25; }
.ir-book-tile-desc { color: #aaa; font-size: 12.5px; line-height: 1.4; }

/* Emergency tile accent (Step 2) */
.ir-book-tile.is-emergency {
	position: relative;
	border-color: rgba(239, 67, 67, 0.5);
	animation: irb-emerg 2s ease-in-out infinite;
}
.ir-book-tile.is-emergency .ir-book-tile-icon { color: #ef4343; }
.ir-book-tile.is-emergency .ir-book-tile-title { color: #ff6a6a; }
@keyframes irb-emerg {
	0%, 100% { box-shadow: 0 0 0 1px rgba(239, 67, 67, 0.4); }
	50% { box-shadow: 0 0 0 1px rgba(239, 67, 67, 0.9), 0 0 18px rgba(239, 67, 67, 0.3); }
}
.ir-book-tile.is-emergency:hover,
.ir-book-tile.is-emergency.selected {
	border-color: #ef4343;
	box-shadow: 0 0 0 1px #ef4343, 0 8px 24px rgba(239, 67, 67, 0.25);
	animation: none;
}

/* ---------- Dates + times ---------- */
.ir-book-dates {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 4px 0 12px;
	-webkit-overflow-scrolling: touch;
}
.ir-book-date {
	flex: 0 0 auto;
	width: 64px;
	padding: 10px 6px;
	background: #222;
	border: 1px solid #333;
	border-radius: 9px;
	cursor: pointer;
	text-align: center;
	font-family: inherit;
	color: #aaa;
	transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.ir-book-date:hover { border-color: #FF4D03; }
.ir-book-date.selected {
	border-color: #FF4D03;
	color: #fff;
	box-shadow: 0 0 0 1px #FF4D03, 0 4px 20px rgba(255, 77, 3, 0.15);
}
.ir-book-date .d-dow { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #aaa; }
.ir-book-date .d-num { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.1; margin: 2px 0; }
.ir-book-date .d-mon { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #aaa; }

.ir-book-times {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-top: 16px;
}
.ir-book-times[hidden] { display: none; }
.ir-book-time {
	padding: 11px 6px;
	background: #222;
	border: 1px solid #333;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	font-family: inherit;
	font-size: 13px;
	color: #fff;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.ir-book-time:hover { border-color: #FF4D03; }
.ir-book-time.selected { background: #FF4D03; border-color: #FF4D03; color: #fff; font-weight: 700; }

.ir-book-times-label {
	color: #aaa;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 16px 0 0;
}

/* ---------- Emergency notice on step 4 ---------- */
.ir-book-emergency-notice {
	background: rgba(244, 183, 64, 0.10);
	border: 1px solid rgba(244, 183, 64, 0.45);
	color: #f0e9e0;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.45;
	margin-bottom: 18px;
	animation: irb-notice-pulse 2.4s ease-in-out infinite;
}
.ir-book-emergency-notice strong { color: #f4b740; }
@keyframes irb-notice-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(244, 183, 64, 0); }
	50% { box-shadow: 0 0 16px 0 rgba(244, 183, 64, 0.22); }
}
.ir-book-emergency-notice[hidden] { display: none; }

/* ---------- Form ---------- */
.ir-book-field { margin-bottom: 14px; }
.ir-book-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ir-book-label {
	display: block;
	color: #fff;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 6px;
}
.ir-book-input,
.ir-book-textarea {
	width: 100%;
	background: #222;
	border: 1px solid #333;
	border-radius: 8px;
	padding: 12px 14px;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.ir-book-input::placeholder,
.ir-book-textarea::placeholder { color: #666; }
.ir-book-input:focus,
.ir-book-textarea:focus { border-color: #FF4D03; box-shadow: 0 0 0 3px rgba(255, 77, 3, 0.18); }
.ir-book-textarea { resize: vertical; min-height: 72px; }
.ir-book-field.has-error .ir-book-input,
.ir-book-field.has-error .ir-book-textarea { border-color: #ef4343; }
.ir-book-error-msg {
	display: none;
	color: #ff7a7a;
	font-size: 12px;
	margin-top: 5px;
}
.ir-book-field.has-error .ir-book-error-msg { display: block; }

/* Honeypot — visually hidden but present for bots */
.ir-book-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

.ir-book-privacy {
	color: #777;
	font-size: 11.5px;
	line-height: 1.5;
	margin: 6px 0 16px;
}

/* ---------- Buttons ---------- */
.ir-book-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 15px 22px;
	border-radius: 999px;
	border: none;
	background: #FF4D03;
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.ir-book-btn:hover { background: #ff5e1f; transform: scale(1.02); }
.ir-book-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.ir-book-btn[hidden] { display: none; }
.ir-book-btn-ghost {
	background: transparent;
	color: #fff;
	border: 1px solid #333;
}
.ir-book-btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: #FF4D03; color: #FF4D03; transform: none; }

/* ---------- Confirmation / Error ---------- */
.ir-book-result { text-align: center; padding: 24px 8px 8px; }
.ir-book-result-icon {
	width: 72px; height: 72px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}
.ir-book-result-icon.ok { background: rgba(255, 77, 3, 0.14); border: 1px solid rgba(255, 77, 3, 0.45); color: #FF4D03; }
.ir-book-result-icon.err { background: rgba(244, 183, 64, 0.12); border: 1px solid rgba(244, 183, 64, 0.45); color: #f4b740; }
.ir-book-result-icon svg { width: 34px; height: 34px; }
.ir-book-result h3 { color: #fff; font-size: 24px; font-weight: 700; margin: 0 0 12px; }
.ir-book-result p { color: #aaa; font-size: 15px; line-height: 1.55; margin: 0 auto 22px; max-width: 42ch; }
.ir-book-result a.tel { color: #FF4D03; font-weight: 700; text-decoration: none; }
.ir-book-result a.tel:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE — mobile < 600px
   ============================================================ */
@media (max-width: 600px) {
	.ir-book-pill { padding: 13px 7px; border-radius: 9px 0 0 9px; }
	.ir-book-pill-label { font-size: 11px; letter-spacing: 0.18em; }
	.ir-book-pill-icon { width: 17px; height: 17px; }

	.ir-book-overlay { padding: 0; align-items: stretch; }
	.ir-book-modal {
		max-width: 100%;
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
		border: none;
	}
	.ir-book-body { padding: 12px 18px 24px; }
	.ir-book-tiles { grid-template-columns: 1fr; }
	.ir-book-tile { min-height: 56px; flex-direction: row; align-items: center; }
	.ir-book-tile-icon { width: 30px; height: 30px; flex-shrink: 0; }
	.ir-book-field-row { grid-template-columns: 1fr; gap: 0; }
	.ir-book-times { grid-template-columns: repeat(3, 1fr); }
	.ir-book-time { min-height: 44px; }
	.ir-book-date { min-height: 44px; }
	.ir-book-step h3 { font-size: 19px; }
}
