/**
 * Precision Scheduler — front-end styles.
 * Brand colours are injected as CSS variables on .pps-overlay by PHP.
 */

/* Trigger button (shortcode) */
.pps-trigger-wrap { margin: 8px 0; }
.pps-trigger-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--pps-primary, #a62c2c);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 16px 34px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, transform .1s ease;
}
.pps-trigger-btn:hover { background: var(--pps-primary-hover, #8f2424); }
.pps-trigger-btn:active { transform: translateY(1px); }

/* Scroll lock */
html.pps-noscroll, body.pps-noscroll { overflow: hidden !important; }

/* Overlay */
.pps-overlay {
	--pps-primary: #a62c2c;
	--pps-primary-hover: #8f2424;
	--pps-header-bg: #a62c2c;
	--pps-body-bg: #f0efee;
	--pps-heading: #1f1f1f;
	--pps-text: #2a2a2a;
	--pps-heading-font: "Rockwell","Roboto Slab","Zilla Slab",Georgia,serif;
	--pps-body-font: inherit;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(60, 60, 60, .78);
	box-sizing: border-box;
	font-family: var(--pps-body-font, inherit);
}
.pps-overlay.is-open { display: flex; animation: pps-fade .18s ease; }
@keyframes pps-fade { from { opacity: 0; } to { opacity: 1; } }

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

/* The [hidden] attribute must win over ALL button display rules below,
   including the hardened .pps-btn { display: inline-flex !important }. */
.pps-overlay [hidden],
.pps-overlay .pps-btn[hidden],
.pps-overlay .pps-back[hidden],
.pps-overlay .pps-continue[hidden] { display: none !important; }

/* ---- Theme-proofing: neutralise host theme button/input resets (e.g. Hello
   Elementor reset.css styles [type=button]/button with its own colours). All
   selectors are scoped to .pps-overlay and beat theme [type=button] (0,1,0).
   Calendar + slot controls are fully (re)styled in the Schedule section below. ---- */
.pps-overlay .pps-option {
	background-color: #fff !important;
	background-image: none !important;
	color: var(--pps-text, #2a2a2a) !important;
	border: 1px solid #d7d7d7 !important;
	text-transform: none !important;
	box-shadow: none !important;
	letter-spacing: normal !important;
}
.pps-overlay .pps-option:hover { background-color: rgba(166, 44, 44, .06) !important; color: var(--pps-text, #2a2a2a) !important; border-color: var(--pps-primary, #a62c2c) !important; }
.pps-overlay .pps-option.is-selected { background-color: rgba(166, 44, 44, .06) !important; color: var(--pps-text, #2a2a2a) !important; border-color: var(--pps-primary, #a62c2c) !important; }
.pps-overlay .pps-input,
.pps-overlay .pps-textarea { background-color: #fff !important; color: #2a2a2a !important; border: 1px solid #cfcfcf !important; }

/* Modal shell */
.pps-modal {
	width: 100%;
	max-width: 980px;
	max-height: 92vh;
	background: var(--pps-body-bg, #f0efee);
	border-radius: 26px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	color: var(--pps-text, #2a2a2a);
}

/* Header */
.pps-header {
	position: relative;
	background: var(--pps-header-bg, #a62c2c);
	color: #fff;
	padding: 30px 40px 26px;
	flex: none;
}
.pps-title {
	margin: 0;
	text-align: center;
	font-family: var(--pps-heading-font);
	font-weight: 700;
	font-size: clamp(24px, 3vw, 34px);
	color: #fff;
	line-height: 1.15;
}
.pps-subtitle {
	margin: 6px 0 0;
	text-align: center;
	font-size: 15px;
	opacity: .92;
	color: #fff;
}
.pps-overlay .pps-close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 46px !important;
	height: 46px !important;
	min-height: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 10px !important;
	background: #fff !important;
	background-image: none !important;
	color: var(--pps-primary, #a62c2c) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: transform .1s ease, box-shadow .15s ease;
}
.pps-overlay .pps-close:hover { box-shadow: 0 4px 12px rgba(0,0,0,.2) !important; }
.pps-overlay .pps-close:active { transform: scale(.95); }
.pps-overlay .pps-close svg { display: block; }
.pps-overlay .pps-close svg path { stroke: var(--pps-primary, #a62c2c) !important; fill: none !important; }

/* Stepper */
.pps-stepper {
	display: flex;
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
}
.pps-stage {
	flex: 1;
	position: relative;
	text-align: center;
	min-width: 0;
}
.pps-stage::before {
	content: "";
	position: absolute;
	top: 8px;
	left: -50%;
	width: 100%;
	border-top: 2px dashed rgba(255, 255, 255, .5);
	z-index: 1;
}
.pps-stage:first-child::before { display: none; }
.pps-dot {
	position: relative;
	z-index: 2;
	display: block;
	width: 16px;
	height: 16px;
	margin: 0 auto;
	border-radius: 50%;
	background: transparent;
	border: 2px solid rgba(255, 255, 255, .65);
}
.pps-stage.is-done .pps-dot { background: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .5); }
.pps-stage.is-active .pps-dot { background: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.pps-stage-label {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: rgba(255, 255, 255, .75);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pps-stage.is-active .pps-stage-label { color: #fff; font-weight: 600; }
.pps-stage.is-done .pps-stage-label { color: rgba(255, 255, 255, .85); }

/* Body */
.pps-body {
	flex: 1;
	overflow-y: auto;
	padding: 42px 40px 24px;
	min-height: 340px;
}
.pps-h {
	margin: 0 0 28px;
	text-align: center;
	font-family: var(--pps-heading-font);
	font-weight: 700;
	font-size: clamp(20px, 2.4vw, 26px);
	color: var(--pps-heading, #1f1f1f);
	line-height: 1.25;
	outline: none;
}
.pps-sub {
	margin: -14px 0 22px;
	text-align: center;
	font-size: 15px;
	color: #555;
}
.pps-accent { color: var(--pps-primary, #a62c2c); }

/* Error */
.pps-error {
	max-width: 640px;
	margin: 0 auto 18px;
	padding: 12px 16px;
	border-radius: 10px;
	background: #fdecec;
	border: 1px solid #f3b7b7;
	color: #9b1c1c;
	font-size: 14px;
	text-align: center;
}

/* Fields */
.pps-field { margin-bottom: 16px; }
.pps-field-center { max-width: 560px; margin: 0 auto; }
.pps-label { display: block; margin-bottom: 8px; font-size: 15px; color: var(--pps-text, #2a2a2a); }
.pps-req { color: var(--pps-primary, #a62c2c); }
.pps-input, .pps-textarea {
	width: 100%;
	padding: 15px 18px;
	border: 1px solid #cfcfcf;
	border-radius: 12px;
	background: #fff;
	font-size: 16px;
	color: #2a2a2a;
	font-family: inherit;
}
.pps-input::placeholder, .pps-textarea::placeholder { color: #9a9a9a; }
.pps-input:focus, .pps-textarea:focus {
	outline: none;
	border-color: var(--pps-primary, #a62c2c);
	box-shadow: 0 0 0 3px rgba(166, 44, 44, .12);
}
.pps-textarea { resize: vertical; min-height: 130px; }
.pps-invalid { border-color: #d33 !important; box-shadow: 0 0 0 3px rgba(211,51,51,.12) !important; }

.pps-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 24px;
	max-width: 760px;
	margin: 0 auto;
}
.pps-field-full { grid-column: 1 / -1; }
.pps-consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #444; }
.pps-consent input { margin-top: 3px; }

/* Option grids */
.pps-options { display: grid; gap: 14px; }
.pps-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pps-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 700px; margin: 0 auto; }
.pps-option {
	background: #fff;
	border: 1px solid #d7d7d7;
	border-radius: 12px;
	padding: 18px 20px;
	font-size: 16px;
	color: #2a2a2a;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s, background .15s;
	font-family: inherit;
}
.pps-option:hover { border-color: var(--pps-primary, #a62c2c); }
.pps-option.is-selected {
	border-color: var(--pps-primary, #a62c2c);
	background: rgba(166, 44, 44, .06);
	box-shadow: inset 0 0 0 1px var(--pps-primary, #a62c2c);
	font-weight: 600;
}

/* Yes/No + centered choices */
.pps-choice-row { display: flex; gap: 18px; justify-content: center; margin-top: 10px; }
.pps-center { text-align: center; margin-top: 8px; }

/* Buttons — hardened against theme/Elementor overrides */
.pps-overlay .pps-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px;
	width: auto;
	border-radius: 999px !important;
	padding: 15px 30px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1 !important;
	cursor: pointer;
	border: 2px solid transparent !important;
	font-family: inherit;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.pps-overlay .pps-btn:active { transform: translateY(1px); }
.pps-overlay .pps-btn-primary { background: var(--pps-primary, #a62c2c) !important; background-image: none !important; color: #fff !important; border-color: var(--pps-primary, #a62c2c) !important; }
.pps-overlay .pps-btn-primary:hover { background: var(--pps-primary-hover, #8f2424) !important; border-color: var(--pps-primary-hover, #8f2424) !important; }
.pps-overlay .pps-btn-ghost { background: #fff !important; background-image: none !important; color: var(--pps-primary, #a62c2c) !important; border-color: var(--pps-primary, #a62c2c) !important; }
.pps-overlay .pps-btn-ghost:hover { background: rgba(166, 44, 44, .06) !important; }
.pps-overlay .pps-btn[disabled] { opacity: .65; cursor: default; }
.pps-overlay .pps-btn-block { display: flex !important; width: 100%; max-width: 320px; margin: 0 auto; }
.pps-overlay .pps-btn svg { flex: none; vertical-align: middle; margin: 0; }
.pps-overlay .pps-btn svg path { stroke: currentColor !important; fill: none !important; }

/* Confirm */
.pps-confirm-h { line-height: 1.5; font-size: clamp(19px, 2.2vw, 24px); }
.pps-confirm-actions { display: flex; flex-direction: column; gap: 14px; align-items: center; margin-top: 24px; }

/* Thank you */
.pps-check {
	width: 96px;
	height: 96px;
	margin: 24px auto 8px;
	border-radius: 50%;
	background: var(--pps-primary, #a62c2c);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 10px #fff, 0 0 0 12px rgba(0,0,0,.05);
}
.pps-ref { margin-top: 18px; }

/* Footer */
.pps-footer {
	flex: none;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 40px 34px;
}
.pps-footer-spacer { flex: 1; }
.pps-back { padding-left: 22px; padding-right: 26px; }

/* Honeypot */
.pps-hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* -------- Schedule (calendar + slots) — premium, theme-proof -------- */
.pps-schedule {
	display: grid;
	grid-template-columns: minmax(0, 330px) 1fr;
	gap: 32px;
	align-items: start;
	max-width: 780px;
	margin: 0 auto;
}
.pps-calendar {
	background: #fff;
	border: 1px solid #efe9e9;
	border-radius: 18px;
	padding: 20px 20px 16px;
	box-shadow: 0 8px 26px rgba(60, 20, 20, .08);
}
.pps-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pps-cal-title { font-weight: 700; font-size: 16px; color: #1f1f1f; }
.pps-overlay .pps-cal-nav {
	width: 34px !important; height: 34px !important; min-width: 0 !important;
	padding: 0 !important; margin: 0 !important;
	display: inline-flex !important; align-items: center !important; justify-content: center !important;
	border: none !important; background: transparent !important; background-image: none !important;
	font-size: 20px; line-height: 1 !important; color: var(--pps-primary, #a62c2c) !important;
	cursor: pointer; border-radius: 50% !important; box-shadow: none !important;
}
.pps-overlay .pps-cal-nav:hover:not([disabled]) { background: rgba(166, 44, 44, .1) !important; }
.pps-overlay .pps-cal-nav[disabled] { opacity: .25 !important; cursor: default; }
.pps-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.pps-cal-dow { margin-bottom: 8px; }
.pps-dow { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #b6a9a9; padding: 2px 0; }
.pps-overlay .pps-day {
	aspect-ratio: 1 / 1;
	width: 100% !important; min-width: 0 !important; height: auto !important;
	padding: 0 !important; margin: 0 !important;
	border: none !important; background: transparent !important; background-image: none !important;
	border-radius: 50% !important;
	font-size: 14px; line-height: 1 !important; color: #2a2a2a !important;
	cursor: pointer; font-family: inherit;
	display: flex !important; align-items: center !important; justify-content: center !important;
	box-shadow: none !important; text-transform: none !important; white-space: nowrap;
	transition: background .12s, box-shadow .12s;
}
.pps-overlay .pps-day:not(.is-selected):hover:not([disabled]) { background: rgba(166, 44, 44, .1) !important; }
.pps-overlay .pps-day.is-muted,
.pps-overlay .pps-day.is-disabled { color: #d3cbcb !important; cursor: default; }
.pps-overlay .pps-day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1.5px var(--pps-primary, #a62c2c) !important; font-weight: 700; }
.pps-overlay .pps-day.is-selected { background: var(--pps-primary, #a62c2c) !important; color: #fff !important; font-weight: 700; box-shadow: none !important; }

.pps-slots { display: flex; flex-direction: column; gap: 12px; }
.pps-slots-title { font-weight: 700; font-size: 15px; color: #1f1f1f; margin: 2px 0 4px; }
.pps-overlay .pps-slot {
	background: #fff !important; background-image: none !important;
	border: 1px solid #e5dede !important; border-radius: 12px !important;
	padding: 15px 18px !important; font-size: 15px; color: #2a2a2a !important;
	cursor: pointer; text-align: left !important; font-family: inherit;
	display: flex !important; align-items: center; gap: 12px;
	box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.pps-slot::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #cdbfbf; flex: none; box-sizing: border-box; }
.pps-overlay .pps-slot:hover:not([disabled]) { border-color: var(--pps-primary, #a62c2c) !important; }
.pps-overlay .pps-slot.is-selected { border-color: var(--pps-primary, #a62c2c) !important; background: rgba(166, 44, 44, .05) !important; box-shadow: inset 0 0 0 1px var(--pps-primary, #a62c2c) !important; font-weight: 600; }
.pps-slot.is-selected::before { border-color: var(--pps-primary, #a62c2c); background: var(--pps-primary, #a62c2c); box-shadow: inset 0 0 0 2px #fff; }
.pps-overlay .pps-slot[disabled] { opacity: .5 !important; cursor: default; }
.pps-slot em { font-style: normal; color: #a89b9b; font-size: 13px; margin-left: auto; }
.pps-slots-hint { color: #8a7f7f; font-size: 14px; padding: 12px 2px; line-height: 1.55; }

/* -------- Responsive -------- */
@media (max-width: 860px) {
	.pps-schedule { grid-template-columns: 1fr; }
	.pps-slots { flex-direction: row; flex-wrap: wrap; }
	.pps-slots .pps-slot { flex: 1 1 40%; }
}
@media (max-width: 680px) {
	.pps-overlay { padding: 0; }
	.pps-modal { max-width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
	.pps-header { padding: 20px 20px 18px; }
	.pps-title { font-size: 22px; padding: 0 42px; }
	.pps-body { padding: 24px 18px; min-height: 0; }
	.pps-footer { padding: 16px 18px 22px; }
	.pps-grid-3, .pps-grid-2 { grid-template-columns: 1fr; }
	.pps-form-grid { grid-template-columns: 1fr; }
	.pps-stage-label { font-size: 0; }
	.pps-stage.is-active .pps-stage-label { font-size: 12px; }
	.pps-choice-row { flex-direction: column; align-items: center; }
	.pps-choice-row .pps-btn { width: 100%; max-width: 260px; }
	.pps-btn { width: 100%; }
	.pps-footer .pps-btn { width: auto; }
	.pps-slots { flex-direction: column; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.pps-overlay.is-open { animation: none; }
	.pps-btn, .pps-option, .pps-trigger-btn { transition: none; }
}
