/* ── Trigger ─────────────────────────────────────────── */
[data-foc-booking-picker] {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.foc-bp-trigger-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.foc-bp-display {
	flex: 1 !important;
	min-height: 42px !important;
	padding: 0.9375rem 1.25rem !important;
	border: 2px solid #dbe0e3 !important;
	border-radius: 0.625rem !important;
	background: #fff !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: #212529 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.foc-bp-display::after {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24' stroke='%23495057' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	flex-shrink: 0;
	opacity: 0.6;
}

.foc-bp-display:hover {
	border-color: #adb5bd !important;
}

.foc-bp-display:focus,
.foc-bp-display[aria-expanded="true"] {
	border-color: #86b7fe !important;
	outline: 0 !important;
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.foc-bp-placeholder {
	color: #9ba3af;
}

.foc-bp-cal-btn {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	cursor: pointer;
	color: #495057;
	transition: background 0.15s, border-color 0.15s;
}

.foc-bp-cal-btn:hover {
	background: #f8f9fa;
	border-color: #adb5bd;
}

/* ── Popup ───────────────────────────────────────────── */
.foc-bp-popup {
	position: fixed;
	z-index: 10500;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	box-shadow: 0 12px 40px rgba(0,0,0,0.13);
	overflow: hidden;
	min-width: 320px;
}

/* ── Header ──────────────────────────────────────────── */
.foc-bp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.8rem 1rem;
	border-bottom: 1px solid #f1f5f9;
}

.foc-bp-head-label {
	font-weight: 600;
	font-size: 0.875rem;
	color: #1e293b;
}

.foc-bp-nav {
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid #e2e8f0;
	border-radius: 0.375rem;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
	color: #374151;
	transition: background 0.12s;
}

.foc-bp-nav:hover:not(:disabled) { background: #f8fafc; }
.foc-bp-nav:disabled { opacity: 0.35; cursor: default; }

.foc-bp-hint {
	text-align: center;
	font-size: 0.78rem;
	color: #6b7280;
	padding: 0.35rem 1rem 0;
}

/* ── Calendars ───────────────────────────────────────── */
.foc-bp-calendars {
	display: flex;
	gap: 0;
	padding: 0.75rem 1rem 0.5rem;
}

.foc-bp-dual .foc-bp-month:first-child {
	padding-right: 1rem;
}

.foc-bp-dual .foc-bp-month + .foc-bp-month {
	border-left: 1px solid #f1f5f9;
	padding-left: 1rem;
}

.foc-bp-month { flex: 1; }

.foc-bp-month-name {
	text-align: center;
	font-weight: 600;
	font-size: 0.82rem;
	color: #374151;
	margin-bottom: 0.5rem;
}

/* Show month names above each calendar in dual view; hide header label */
.foc-bp-dual .foc-bp-month-name { display: block; }
.foc-bp-dual .foc-bp-head-label { display: none; }

.foc-bp-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
}

.foc-bp-dh {
	text-align: center;
	font-size: 0.68rem;
	font-weight: 700;
	color: #9ca3af;
	padding: 0.15rem 0 0.4rem;
	text-transform: uppercase;
}

.foc-bp-dc {
	position: relative;
	text-align: center;
	font-size: 0.82rem;
	padding: 0.38rem 0.1rem;
	border-radius: 0.25rem;
	cursor: pointer;
	user-select: none;
	transition: background 0.1s, color 0.1s;
	color: #1e293b;
}

.foc-bp-dc:hover:not(.foc-bp-blocked):not(.foc-bp-empty):not(.foc-bp-today) {
	background: #e0edff;
}

.foc-bp-empty { cursor: default; }

.foc-bp-blocked {
	color: #cbd5e1;
	cursor: not-allowed;
	pointer-events: none;
}

.foc-bp-today {
	font-weight: 700;
	color: #94a3b8;
	cursor: not-allowed;
	pointer-events: none;
	text-decoration: underline;
}

/* Selected endpoints */
.foc-bp-from,
.foc-bp-to {
	background: #2563eb !important;
	color: #fff !important;
	font-weight: 600;
	border-radius: 0.25rem;
	z-index: 1;
}

/* Range fill */
.foc-bp-in-range {
	background: #dbeafe;
	color: #1e40af;
	border-radius: 0;
}

/* Range — from gets rounded left, to gets rounded right */
.foc-bp-from:not(.foc-bp-single) { border-radius: 0.25rem 0 0 0.25rem; }
.foc-bp-to:not(.foc-bp-single)   { border-radius: 0 0.25rem 0.25rem 0; }
.foc-bp-single { border-radius: 0.25rem; }

/* Hover preview */
.foc-bp-hover-range {
	background: #eff6ff;
	border-radius: 0;
}

.foc-bp-hover-end {
	background: #93c5fd !important;
	color: #1e3a8a !important;
	border-radius: 0 0.25rem 0.25rem 0;
}

/* ── Time section (below display, outside popup) ─────── */
.foc-bp-times-outer {
	margin-top: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.foc-bp-time-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.foc-bp-time-row + .foc-bp-time-row {
	margin-top: 10px;
}

.foc-bp-time-meta {
	display: flex;
	flex-direction: column;
	min-width: 96px;
}

.foc-bp-time-dt {
	font-size: 0.8rem;
	font-weight: 600;
	color: #1e293b;
	min-height: 1em;
}

.foc-bp-time-lbl {
	font-size: 0.7rem;
	color: #9ca3af;
	margin-top: 1px;
}

.foc-bp-sel {
	flex: 1 !important;
	padding: 0.9375rem 1.25rem !important;
	border: 2px solid #dbe0e3 !important;
	border-radius: 0.625rem !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	background: #fff !important;
	cursor: pointer !important;
	color: #212529 !important;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.foc-bp-sel:hover { border-color: #adb5bd !important; }
.foc-bp-sel:focus { outline: 0 !important; border-color: #86b7fe !important; box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important; }
.foc-bp-sel:disabled { background: #f8fafc !important; cursor: not-allowed !important; color: #cbd5e1 !important; }

.foc-bp-times-actions {
	display: flex;
	justify-content: flex-start;
	margin-top: 0.25rem;
}

.foc-bp-clear {
	background: none;
	border: none;
	font-size: 0.82rem;
	color: #9ca3af;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}

.foc-bp-clear:hover { color: #ef4444; }

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 699px) {
	.foc-bp-popup {
		position: fixed !important;
		top: auto !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100%;
		max-width: 100%;
		border-radius: 1.25rem 1.25rem 0 0;
		max-height: 90dvh;
		overflow-y: auto;
	}
}
