/* =========================================================
   widget-v2.css – new booking widget (include/widget.php)
   Everything is scoped to .ccw (the box) and .ccw-panel (the date/time panel),
   so it doesn't affect any other form on the site.
   ========================================================= */

.ccw, .ccw-panel {
	--ccw-navy: #004894;
	--ccw-navy-deep: #003a7a;
	--ccw-sky: #7ec8f0;
	--ccw-pale: #eef4fb;
	--ccw-pale-2: #f6f9fd;
	--ccw-ink: #1a2a3a;
	--ccw-muted: #5f6b7a;
	--ccw-faint: #8b97a6;
	--ccw-line: #dde5ef;
	--ccw-amber: #e8a000;
	--ccw-ok: #1f8a5b;
	--ccw-r: 10px;
	font-family: "Nunito Sans", system-ui, sans-serif;
	color: var(--ccw-ink);
	line-height: 1.45;
	text-align: left;
	box-sizing: border-box;
}
.ccw *, .ccw *::before, .ccw *::after,
.ccw-panel *, .ccw-panel *::before, .ccw-panel *::after { box-sizing: border-box; }

/* reset site-wide form styles inside the widget */
.ccw button, .ccw select, .ccw input,
.ccw-panel button {
	font: inherit; color: inherit; margin: 0; letter-spacing: normal; text-transform: none;
	box-shadow: none; min-height: 0; width: auto; height: auto; line-height: inherit;
}
.ccw button, .ccw-panel button { background: none; border: 0; padding: 0; cursor: pointer; }

.ccw-mi {
	font-family: "Material Icons Outlined"; font-weight: normal; font-style: normal; font-size: 18px;
	line-height: 1; display: inline-block; letter-spacing: normal; text-transform: none;
	white-space: nowrap; -webkit-font-smoothing: antialiased; direction: ltr;
}
.ccw :focus-visible, .ccw-panel :focus-visible { outline: 3px solid var(--ccw-sky); outline-offset: 2px; }

/* ---------- the box ---------- */
.ccw {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 14px 34px rgba(0, 30, 70, 0.22);
	padding: 18px 20px 12px;
	scroll-margin-top: 16px;
}

/* vehicle type buttons */
.ccw-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; min-height: 42px; align-items: center; }
.ccw-types-loading { color: var(--ccw-muted); font-size: 14px; }
.ccw .ccw-type {
	display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
	border: 1.5px solid var(--ccw-line); background: #fff; font-weight: 700; font-size: 15px;
	color: var(--ccw-ink); transition: background .15s, border-color .15s, color .15s;
}
.ccw .ccw-type .ccw-mi { font-size: 22px; color: var(--ccw-navy); }
.ccw .ccw-type:hover { border-color: var(--ccw-navy); }
.ccw .ccw-type[aria-pressed="true"] { background: var(--ccw-navy); border-color: var(--ccw-navy); color: #fff; }
.ccw .ccw-type[aria-pressed="true"] .ccw-mi { color: #fff; }

/* field row */
.ccw-row { display: grid; grid-template-columns: 1.3fr 1.3fr 1.3fr .9fr auto; gap: 10px; align-items: stretch; }
.ccw .ccw-field {
	position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 62px;
	padding: 8px 14px; border: 1.5px solid var(--ccw-line); border-radius: var(--ccw-r); background: #fff;
	text-align: left; transition: border-color .15s, box-shadow .15s, background .15s; min-width: 0;
}
.ccw-lab { font-size: 13px; font-weight: 700; color: var(--ccw-muted); display: flex; align-items: center; gap: 6px; }
.ccw-lab .ccw-mi { font-size: 16px; }
.ccw-val { font-size: 16px; font-weight: 700; color: var(--ccw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 18px; }
.ccw-ph { font-size: 16px; font-weight: 600; color: var(--ccw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 18px; }
.ccw-tick { display: none; color: var(--ccw-ok); }
.ccw .ccw-field.ccw-done .ccw-tick { display: inline-block; }
.ccw .ccw-field.ccw-active { border-color: var(--ccw-navy); box-shadow: 0 0 0 4px rgba(0, 72, 148, 0.14); }
.ccw .ccw-field.ccw-locked { border-style: dashed; background: var(--ccw-pale-2); cursor: not-allowed; }
.ccw .ccw-field.ccw-locked .ccw-lab { color: var(--ccw-faint); }
.ccw .ccw-field.ccw-locked .ccw-ph { font-size: 14px; color: var(--ccw-faint); }
.ccw .ccw-field select {
	position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
	border: 0; padding: 0; background: transparent;
}
.ccw .ccw-field.ccw-locked select { cursor: not-allowed; }
.ccw-chev { position: absolute; right: 10px; bottom: 14px; color: var(--ccw-muted); font-size: 20px; pointer-events: none; }
.ccw-shake { animation: ccw-shake .35s; }
@keyframes ccw-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.ccw .ccw-go {
	min-height: 62px; padding: 0 26px; border-radius: var(--ccw-r); background: var(--ccw-navy); color: #fff;
	font-weight: 800; font-size: 16px; white-space: nowrap; transition: background .15s;
}
.ccw .ccw-go:hover { background: var(--ccw-navy-deep); }
.ccw .ccw-go:disabled { opacity: .7; cursor: progress; }

.ccw-under { display: flex; align-items: center; gap: 12px; margin-top: 10px; min-height: 30px; flex-wrap: wrap; }
.ccw .ccw-link { color: var(--ccw-navy); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.ccw-promo { display: none; align-items: center; gap: 8px; }
.ccw-promo.ccw-open { display: flex; }
.ccw .ccw-promo input {
	height: 36px; width: 170px; border: 1.5px solid var(--ccw-line); border-radius: 8px; padding: 0 10px;
	background: #fff; font-size: 15px;
}
.ccw-msg { margin-left: auto; font-size: 14px; color: var(--ccw-muted); }
.ccw-msg.ccw-err { color: #b42318; font-weight: 700; }

/* ---------- date + time panel ---------- */
.ccw-panel {
	display: none; position: absolute; z-index: 9500; background: #fff; border-radius: 14px;
	box-shadow: 0 22px 50px rgba(0, 30, 70, 0.28); border: 1px solid var(--ccw-line); overflow: hidden;
}
.ccw-panel.ccw-open { display: block; animation: ccw-drop .18s ease-out; }
@keyframes ccw-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.ccw-p-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--ccw-line); background: var(--ccw-pale-2); }
.ccw-panel .ccw-p-tab {
	display: flex; flex-direction: column; align-items: flex-start; padding: 7px 14px; border-radius: 9px;
	border: 1.5px solid transparent; min-width: 170px; text-align: left;
}
.ccw-t { font-size: 12px; font-weight: 700; color: var(--ccw-muted); }
.ccw-v { font-size: 15px; font-weight: 800; color: var(--ccw-ink); }
.ccw-panel .ccw-p-tab[aria-selected="true"] { background: #fff; border-color: var(--ccw-navy); }
.ccw-panel .ccw-p-tab:disabled { opacity: .55; cursor: not-allowed; }
.ccw-p-arrow { color: var(--ccw-muted); font-size: 20px; }
.ccw-panel .ccw-p-close { margin-left: auto; color: var(--ccw-muted); padding: 6px; border-radius: 8px; }
.ccw-panel .ccw-p-close .ccw-mi { font-size: 22px; }
.ccw-panel .ccw-p-close:hover { background: var(--ccw-pale); }

.ccw-p-body { display: grid; grid-template-columns: 1fr 330px; }
.ccw-cal { padding: 14px 18px 10px; }
.ccw-cal-nav { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ccw-panel .ccw-cal-nav button {
	width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ccw-line); background: #fff;
	display: grid; place-items: center; color: var(--ccw-navy);
}
.ccw-panel .ccw-cal-nav button .ccw-mi { font-size: 22px; }
.ccw-panel .ccw-cal-nav button:disabled { opacity: .35; cursor: not-allowed; }
.ccw-months { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ccw-month h4 { margin: 0 0 8px; text-align: center; font-size: 15px; font-weight: 800; color: var(--ccw-ink); text-transform: none; letter-spacing: 0; }
.ccw-dow, .ccw-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.ccw-dow span { font-size: 12px; font-weight: 700; color: var(--ccw-muted); padding: 4px 0; }
.ccw-panel .ccw-day {
	position: relative; height: 40px; margin: 1px 0; font-weight: 700; font-size: 14px; color: var(--ccw-ink);
	font-variant-numeric: tabular-nums; text-align: center;
}
.ccw-day span { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.ccw-panel .ccw-day:hover:not(:disabled):not(.ccw-sel):not(.ccw-rs):not(.ccw-re) span { background: var(--ccw-pale); }
.ccw-day.ccw-today span { box-shadow: inset 0 0 0 1.5px var(--ccw-line); }
.ccw-panel .ccw-day:disabled { cursor: default; color: #b8c2ce; font-weight: 600; }
.ccw-day.ccw-closed { text-decoration: line-through; text-decoration-color: #c9d1db; }
.ccw-day.ccw-inrange::before { content: ""; position: absolute; inset: 3px 0; background: var(--ccw-pale); }
.ccw-day.ccw-rs::before { content: ""; position: absolute; inset: 3px 0 3px 50%; background: var(--ccw-pale); }
.ccw-day.ccw-re::before { content: ""; position: absolute; inset: 3px 50% 3px 0; background: var(--ccw-pale); }
.ccw-day.ccw-rs.ccw-re::before { display: none; }
.ccw-day.ccw-sel span, .ccw-day.ccw-rs span, .ccw-day.ccw-re span { background: var(--ccw-navy); color: #fff; }
.ccw-legend { display: flex; gap: 18px; font-size: 13px; color: var(--ccw-muted); padding: 10px 2px 4px; }
.ccw-strike { font-style: normal; text-decoration: line-through; color: #b8c2ce; font-weight: 700; margin-right: 6px; }

.ccw-side { border-left: 1px solid var(--ccw-line); display: flex; flex-direction: column; min-height: 390px; max-height: 430px; }
.ccw-hours { padding: 16px 18px 14px; border-bottom: 1px solid var(--ccw-line); background: var(--ccw-pale-2); }
.ccw-hours-d { font-size: 13px; font-weight: 700; color: var(--ccw-muted); }
.ccw-hours-h { font-size: 24px; font-weight: 800; color: var(--ccw-navy); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ccw-note {
	display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 13px; font-weight: 700;
	color: #8a5a00; background: #fff4dc; border-radius: 8px; padding: 6px 9px;
}
.ccw-note .ccw-mi { font-size: 16px; color: var(--ccw-amber); }
.ccw-empty { font-size: 14px; color: var(--ccw-muted); margin: 0; }
.ccw-slots { padding: 12px 18px 16px; overflow: auto; flex: 1; }
.ccw-slots h5 { font-size: 13px; font-weight: 700; color: var(--ccw-muted); margin: 6px 0 8px; text-transform: none; letter-spacing: 0; }
.ccw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.ccw-panel .ccw-slot {
	height: 36px; border-radius: 8px; border: 1.5px solid var(--ccw-line); background: #fff;
	font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; text-align: center;
}
.ccw-panel .ccw-slot:hover:not(:disabled) { border-color: var(--ccw-navy); }
.ccw-panel .ccw-slot[aria-pressed="true"] { background: var(--ccw-navy); border-color: var(--ccw-navy); color: #fff; }
.ccw-panel .ccw-slot:disabled { color: #c2cbd6; background: var(--ccw-pale-2); border-style: dashed; cursor: not-allowed; }
.ccw-p-foot { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1050px) {
	.ccw-row { grid-template-columns: 1fr 1fr; }
	.ccw-row .ccw-f-loc, .ccw-row .ccw-go { grid-column: 1 / -1; }
	.ccw-p-body { grid-template-columns: 1fr 300px; }
	.ccw-months { grid-template-columns: 1fr; }
	.ccw-months .ccw-month:nth-child(2) { display: none; }
}

/* ---------- phones: the panel becomes a full-screen sheet ---------- */
@media (max-width: 700px) {
	.ccw { padding: 14px; border-radius: 12px; }
	.ccw-types { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 0 14px 2px; scrollbar-width: none; }
	.ccw-types::-webkit-scrollbar { display: none; }
	.ccw .ccw-type { flex: 0 0 auto; padding: 8px 13px; font-size: 14px; }
	.ccw-row { grid-template-columns: 1fr; }
	.ccw-msg { margin-left: 0; width: 100%; }

	.ccw-panel { position: fixed; inset: 0 !important; width: auto !important; border-radius: 0; border: 0; }
	.ccw-panel.ccw-open { display: flex; flex-direction: column; animation: ccw-up .2s ease-out; }
	@keyframes ccw-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
	.ccw-p-head { padding: 10px; }
	.ccw-panel .ccw-p-tab { min-width: 0; flex: 1; padding: 6px 10px; }
	.ccw-p-arrow { display: none; }
	.ccw-p-body { grid-template-columns: 1fr; overflow: auto; flex: 1; }
	.ccw-cal { padding: 10px 12px 4px; }
	.ccw-side { border-left: 0; border-top: 1px solid var(--ccw-line); min-height: 0; max-height: none; }
	.ccw-slots { overflow: visible; }
	.ccw-p-foot { display: flex; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ccw-line); background: #fff; }
	.ccw-panel .ccw-p-foot button {
		flex: 1; height: 50px; border-radius: 10px; background: var(--ccw-navy); color: #fff; font-weight: 800; font-size: 16px;
	}
	.ccw-panel .ccw-p-foot button:disabled { background: #b8c6d6; cursor: default; }
	body.ccw-noscroll { overflow: hidden; }
}

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