/**
 * Google Calendar–style scroll wheel for PH Bookings time slots.
 */

/* Hide native slot list only when scroll wheels are active (fallback stays visible). */
.time-picker.dwpb-time-picker--wheel-active .ph-ul-time,
.dw-ph-booking-calendar .time-picker:has(.dwpb-time-wheel.is-active) .ph-ul-time,
.time-picker-wraper .time-picker:has(.dwpb-time-wheel.is-active) .ph-ul-time {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.dwpb-time-wheel {
	--dwpb-wheel-item-h: 44px;
	--dwpb-wheel-visible: 5;
	--dwpb-wheel-accent: #1a73e8;
	--dwpb-wheel-fade: #ffffff;
	display: none;
	width: 100%;
	margin-top: 0;
}

.dwpb-time-wheel.is-active {
	display: block;
}

.dwpb-time-wheel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 4px 12px;
}

.dwpb-time-wheel__title {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: #3c4043;
}

.dwpb-time-wheel__pair {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.dwpb-time-wheel__column {
	flex: 1 1 0;
	min-width: 0;
}

.dwpb-time-wheel__label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #5f6368;
	text-align: center;
}

.dwpb-time-wheel__viewport {
	position: relative;
	height: calc(var(--dwpb-wheel-item-h) * var(--dwpb-wheel-visible));
	overflow: hidden;
	border-radius: 12px;
	background: #f8f9fa;
}

.dwpb-time-wheel__viewport::before,
.dwpb-time-wheel__viewport::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: calc(var(--dwpb-wheel-item-h) * 2);
	pointer-events: none;
	z-index: 2;
}

.dwpb-time-wheel__viewport::before {
	top: 0;
	background: linear-gradient(to bottom, var(--dwpb-wheel-fade) 15%, rgba(248, 249, 250, 0));
}

.dwpb-time-wheel__viewport::after {
	bottom: 0;
	background: linear-gradient(to top, var(--dwpb-wheel-fade) 15%, rgba(248, 249, 250, 0));
}

.dwpb-time-wheel__highlight {
	position: absolute;
	left: 8px;
	right: 8px;
	top: 50%;
	height: var(--dwpb-wheel-item-h);
	margin-top: calc(var(--dwpb-wheel-item-h) / -2);
	border-radius: 8px;
	background: rgba(26, 115, 232, 0.12);
	border: 1px solid rgba(26, 115, 232, 0.28);
	pointer-events: none;
	z-index: 1;
}

.dwpb-time-wheel__list {
	position: relative;
	z-index: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	overscroll-behavior: contain;
}

.dwpb-time-wheel__list::-webkit-scrollbar {
	display: none;
}

.dwpb-time-wheel__spacer {
	height: calc(var(--dwpb-wheel-item-h) * 2);
	flex-shrink: 0;
	scroll-snap-align: none;
	pointer-events: none;
}

.dwpb-time-wheel__item {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--dwpb-wheel-item-h);
	padding: 0 12px;
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.2;
	color: #3c4043;
	scroll-snap-align: center;
	cursor: pointer;
	user-select: none;
	transition: color 0.15s ease, opacity 0.15s ease;
}

.dwpb-time-wheel__item.is-selected {
	color: var(--dwpb-wheel-accent);
	font-weight: 600;
}

.dwpb-time-wheel__item.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.dwpb-time-wheel__empty {
	padding: 24px 16px;
	text-align: center;
	font-size: 0.875rem;
	color: #5f6368;
}

.dwpb-time-wheel--single .dwpb-time-wheel__pair {
	justify-content: center;
}

.dwpb-time-wheel--single .dwpb-time-wheel__column {
	max-width: 220px;
	margin: 0 auto;
}

@media (max-width: 480px) {
	.dwpb-time-wheel {
		--dwpb-wheel-item-h: 40px;
	}

	.dwpb-time-wheel__item {
		font-size: 1rem;
	}
}
.dwpb-has-time-wheel {
	margin-bottom: 50px;
}