/*
 * CTG Scheduler — front-end styles.
 *
 * Brand/shape values below (accent color, card radius, card border, card
 * shadow, button shape) were measured directly from the live production
 * CSS at colestechnicalgroup.com (computed styles on the real ".ctg-cta"
 * button and the real proof/gap cards) and are kept as-is. Typography
 * and page background are deliberately NOT redeclared here — get_header()/
 * get_footer() already load the real theme, and this file only styles the
 * scheduler widget's own interactive parts.
 *
 * CORRECTED IN THIS REVISION: every text/border/surface color below is a
 * light-theme palette (dark text on a white/near-white card). A previous
 * revision of this file used a light-on-dark palette (near-white text,
 * translucent-white borders) copied forward from an earlier draft without
 * confirming it against the real page — on the real /schedule/ page's
 * actual white background that made almost all copy and every unselected
 * control unreadable (confirmed against a live screenshot: only the solid
 * blue selected/primary-button states, which don't depend on the text
 * colors below, were visible). Nothing about layout, radius, shadow, or
 * the brand accent changed — only text/border/surface colors, so every
 * element reads clearly against a white or near-white page background.
 *
 *   Brand accent (the real "Schedule a call" button color): #1756a9
 *   Card radius (measured on real proof/gap cards):          16px
 *   Card border (measured):     1px solid rgba(23,86,169,.25)
 *   Card shadow (measured):     0 10px 30px rgba(23,86,169,.14)
 *   Button shape (measured):    999px radius, 700 weight, 10px 20px
 */

.ctg-scheduler-page {
	max-width: 760px;
	margin: 0 auto;
	padding: 3rem 1.25rem 5rem;
}

.ctg-scheduler-staging-banner {
	max-width: 760px;
	margin: 1.5rem auto 0;
	padding: 0.85rem 1.1rem;
	border: 1px dashed rgba(180, 83, 9, 0.55);
	background: rgba(217, 119, 6, 0.08);
	color: #7c2d12;
	border-radius: 10px;
	font-size: 0.85rem;
	line-height: 1.5;
}

.ctg-scheduler-staging-banner code {
	background: rgba(124, 45, 18, 0.08);
	padding: 0.1em 0.4em;
	border-radius: 4px;
}

.ctg-scheduler-root {
	margin-top: 2rem;
}

.ctg-scheduler-noscript {
	color: #475569;
}

/* --- card shell shared by every step ---------------------------------- */

.ctg-card {
	border-radius: 16px;
	border: 1px solid rgba(23, 86, 169, 0.18);
	box-shadow: 0 10px 30px rgba(23, 86, 169, 0.1);
	background: #ffffff;
	padding: 1.75rem 1.75rem 2rem;
}

@media (max-width: 560px) {
	.ctg-card {
		padding: 1.25rem 1.1rem 1.5rem;
	}
}

/* --- step indicator ----------------------------------------------------- */

.ctg-step-counter {
	margin: 0 0 0.6rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #1756a9;
}

.ctg-steps {
	display: flex;
	gap: 0.75rem;
	margin: 0 0 1.75rem;
	list-style: none;
	padding: 0;
}

.ctg-steps li {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	text-align: left;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	color: #8a97a8;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid rgba(20, 35, 61, 0.12);
}

.ctg-step-index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	flex-shrink: 0;
	border-radius: 999px;
	background: rgba(20, 35, 61, 0.06);
	color: inherit;
	font-size: 0.72rem;
	font-weight: 700;
}

.ctg-step-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ctg-steps li.is-active {
	color: #14233d;
	font-weight: 600;
	border-color: #1756a9;
}

.ctg-steps li.is-active .ctg-step-index {
	background: #1756a9;
	color: #ffffff;
}

.ctg-steps li.is-complete {
	color: #1756a9;
	border-color: rgba(23, 86, 169, 0.45);
}

.ctg-steps li.is-complete .ctg-step-index {
	background: rgba(23, 86, 169, 0.14);
	color: #1756a9;
}

@media (max-width: 560px) {
	.ctg-step-label {
		display: none;
	}
	.ctg-steps li {
		justify-content: center;
	}
}

/* --- buttons ------------------------------------------------------------- */

.ctg-btn-primary,
.ctg-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 700;
	font-size: 0.92rem;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.15s ease;
	border: 1px solid transparent;
	text-decoration: none;
}

.ctg-btn-primary {
	background: #1756a9;
	color: #ffffff;
}

.ctg-btn-primary:hover:not(:disabled) {
	background: #124a92;
}

.ctg-btn-primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ctg-btn-secondary {
	background: transparent;
	color: #1756a9;
	border-color: rgba(23, 86, 169, 0.4);
}

.ctg-btn-secondary:hover {
	background: rgba(23, 86, 169, 0.08);
}

.ctg-btn-danger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 700;
	font-size: 0.92rem;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.15s ease;
	background: rgba(216, 97, 60, 0.1);
	border: 1px solid rgba(216, 97, 60, 0.5);
	color: #9a3412;
}

.ctg-btn-danger:hover:not(:disabled) {
	background: #d8613c;
	color: #ffffff;
}

.ctg-btn-danger:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ctg-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.75rem;
	gap: 1rem;
}

.ctg-actions.is-end {
	justify-content: flex-end;
}

/* --- calendar ------------------------------------------------------------ */

.ctg-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.ctg-calendar-nav h3 {
	margin: 0;
	font-size: 1.1rem;
	color: #14233d;
}

.ctg-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}

.ctg-calendar-weekday {
	text-align: center;
	font-size: 0.72rem;
	color: #8a97a8;
	padding-bottom: 4px;
}

.ctg-calendar-day {
	aspect-ratio: 1;
	width: 100%;
	border-radius: 10px;
	background: transparent;
	border: 1px solid rgba(20, 35, 61, 0.08);
	color: #b3bcc7;
	font-family: inherit;
	font-size: 0.85rem;
	cursor: default;
}

.ctg-calendar-day.is-bookable {
	border-color: rgba(23, 86, 169, 0.4);
	color: #14233d;
	cursor: pointer;
}

.ctg-calendar-day.is-bookable:hover {
	background: rgba(23, 86, 169, 0.1);
}

.ctg-calendar-day.is-selected {
	background: #1756a9;
	border-color: #1756a9;
	color: #ffffff;
	font-weight: 600;
}

.ctg-calendar-day.is-empty {
	border: none;
	visibility: hidden;
}

/* --- time slots ------------------------------------------------------------ */

.ctg-timezone-note {
	font-size: 0.8rem;
	color: #64748b;
	margin: 0 0 1rem;
}

.ctg-time-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 8px;
}

.ctg-time-slot {
	border-radius: 999px;
	border: 1px solid rgba(23, 86, 169, 0.4);
	background: transparent;
	color: #14233d;
	font-family: inherit;
	font-size: 0.85rem;
	padding: 9px 10px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.ctg-time-slot:hover {
	background: rgba(23, 86, 169, 0.1);
}

.ctg-time-slot.is-selected {
	background: #1756a9;
	border-color: #1756a9;
	color: #ffffff;
	font-weight: 600;
}

.ctg-empty-state {
	color: #64748b;
	font-size: 0.92rem;
	padding: 1rem 0;
}

/* --- choice pills (single/multi select questions) --------------------------
 *
 * Redesigned: the old version was a flat, low-contrast outline pill with
 * no indicator beyond a color swap on press — hard to scan, and easy to
 * miss which options were actually selected. This version gives each
 * option real card-like presence (a defined surface, not just a border),
 * a dedicated check/radio indicator that fills on selection instead of
 * relying on color alone, a deliberate press/hover motion, and a visible
 * focus ring for keyboard users. Sizing and spacing are consistent
 * whether the group wraps to one row or several.
 */

.ctg-choice-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ctg-choice-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	border-radius: 12px;
	border: 1px solid rgba(20, 35, 61, 0.14);
	background: #f6f9fc;
	color: #14233d;
	font-family: inherit;
	font-size: 0.88rem;
	line-height: 1.3;
	padding: 11px 16px 11px 12px;
	cursor: pointer;
	text-align: left;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.ctg-choice-pill:hover {
	background: rgba(23, 86, 169, 0.1);
	border-color: rgba(23, 86, 169, 0.45);
}

.ctg-choice-pill:active {
	transform: scale(0.98);
}

.ctg-choice-pill:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(23, 86, 169, 0.35);
}

.ctg-choice-pill-check {
	flex-shrink: 0;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 6px;
	border: 1.5px solid rgba(20, 35, 61, 0.3);
	background: #ffffff;
	position: relative;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ctg-choice-pill-check::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 45%;
	width: 7px;
	height: 4px;
	border-left: 2px solid #ffffff;
	border-bottom: 2px solid #ffffff;
	transform: translate(-50%, -50%) rotate(-45deg) scale(0);
	transform-origin: center;
	transition: transform 0.12s ease;
}

.ctg-choice-pill-text {
	flex: 1;
}

.ctg-choice-pill.is-selected {
	background: #1756a9;
	border-color: #1756a9;
	color: #ffffff;
	font-weight: 600;
	box-shadow: 0 6px 18px rgba(23, 86, 169, 0.3);
}

.ctg-choice-pill.is-selected:hover {
	background: #124a92;
	border-color: #124a92;
}

.ctg-choice-pill.is-selected .ctg-choice-pill-check {
	background: rgba(255, 255, 255, 0.2);
	border-color: #ffffff;
}

.ctg-choice-pill.is-selected .ctg-choice-pill-check::after {
	transform: translate(-50%, -50%) rotate(-45deg) scale(1);
}

/* single_select renders its check as a dot in a circle rather than a
   checkmark in a square, so the shape itself communicates "pick one" vs
   "pick any" without needing separate copy. */
.ctg-choice-pill[data-kind="single"] .ctg-choice-pill-check {
	border-radius: 999px;
}

.ctg-choice-pill.is-disabled,
.ctg-choice-pill:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
}

.ctg-choice-pill.is-disabled:hover,
.ctg-choice-pill:disabled:hover {
	background: #f6f9fc;
	border-color: rgba(20, 35, 61, 0.14);
}

@media (max-width: 560px) {
	.ctg-choice-pill {
		flex: 1 1 100%;
	}
}

/* --- form fields ------------------------------------------------------------- */

.ctg-field {
	margin-bottom: 1.4rem;
}

.ctg-field:last-child {
	margin-bottom: 0;
}

.ctg-field > label,
.ctg-field > .ctg-field-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #14233d;
	font-size: 0.95rem;
}

.ctg-field-hint {
	display: block;
	font-size: 0.78rem;
	color: #64748b;
	margin: -0.15rem 0 0.6rem;
}

.ctg-field input[type="text"],
.ctg-field input[type="email"],
.ctg-field textarea {
	width: 100%;
	background: #f8fafc;
	border: 1px solid rgba(20, 35, 61, 0.16);
	border-radius: 10px;
	padding: 10px 14px;
	color: #14233d;
	font-family: inherit;
	font-size: 0.92rem;
	box-sizing: border-box;
}

.ctg-field textarea {
	min-height: 96px;
	resize: vertical;
}

.ctg-field input::placeholder,
.ctg-field textarea::placeholder {
	color: #9aa5b1;
}

.ctg-field input:focus,
.ctg-field textarea:focus {
	outline: none;
	border-color: #1756a9;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(23, 86, 169, 0.18);
}

.ctg-field.has-error input,
.ctg-field.has-error textarea {
	border-color: #d8613c;
}

.ctg-error-text {
	color: #c2410c;
	font-size: 0.8rem;
	margin: 0.4rem 0 0;
}

/* Honeypot: present in the DOM for real browsers, hidden from sighted
   and screen-reader users alike, and never reachable by tab. A human
   never fills this in; anything that does is treated as spam server-side. */
.ctg-scheduler-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- review / confirm step ---------------------------------------------------- */

.ctg-review-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid rgba(20, 35, 61, 0.08);
	font-size: 0.9rem;
}

.ctg-review-row:last-child {
	border-bottom: none;
}

.ctg-review-row dt {
	color: #64748b;
}

.ctg-review-row dd {
	margin: 0;
	text-align: right;
	color: #14233d;
	max-width: 60%;
}

/* --- confirmation / manage screens --------------------------------------------- */

.ctg-confirm-heading {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.75rem;
}

.ctg-confirm-heading h2,
.ctg-confirm-heading h3 {
	color: #14233d;
	margin: 0;
}

.ctg-confirm-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	background: #1756a9;
	color: #ffffff;
	flex-shrink: 0;
}

.ctg-manage-links {
	display: flex;
	gap: 1.25rem;
	margin-top: 1.5rem;
	font-size: 0.85rem;
}

.ctg-manage-links a {
	color: #1756a9;
	font-weight: 600;
	text-decoration: underline;
}

.ctg-status-banner {
	border-radius: 10px;
	padding: 0.85rem 1rem;
	font-size: 0.88rem;
	margin-bottom: 1.25rem;
}

.ctg-status-banner.is-error {
	background: rgba(216, 97, 60, 0.1);
	border: 1px solid rgba(216, 97, 60, 0.4);
	color: #7c2d12;
}

.ctg-status-banner.is-info {
	background: rgba(23, 86, 169, 0.08);
	border: 1px solid rgba(23, 86, 169, 0.25);
	color: #0f3d75;
}

.ctg-loading {
	color: #64748b;
	font-size: 0.9rem;
	padding: 1rem 0;
}
