/* Classroom hour quantity on BookingPress service cards + hide extras drawer */

.bpa-frontend-vue3 .bpa-fm--service__advance-options,
.bpa-frontend-vue3-root .bpa-fm--service__advance-options {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	height: 0 !important;
	overflow: hidden !important;
}

body.--bpa-open-advance-drawer {
	overflow: auto !important;
}

/* Card body becomes a clean vertical stack once hour qty is present. */
.bpa-front-si-card:has(.jpc-hours-qty) .bpa-front-si__card-body,
.bpa-front-module--service-item:has(.jpc-hours-qty) .bpa-front-si__card-body,
.bpa-front-si-card.jpc-has-hours-qty .bpa-front-si__card-body {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 0 !important;
	min-width: 0;
	overflow: visible !important;
}

.bpa-front-si-card:has(.jpc-hours-qty) .bpa-front-si__card-body--heading,
.bpa-front-module--service-item:has(.jpc-hours-qty) .bpa-front-si__card-body--heading,
.bpa-front-si-card.jpc-has-hours-qty .bpa-front-si__card-body--heading {
	margin-bottom: 0.85rem !important;
	max-width: 100% !important;
}

.jpc-hours-qty {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	margin: 0 0 0.95rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid #e4e4e4;
	border-radius: 4px;
	background: #f7f7f7;
	flex-wrap: nowrap;
	position: relative;
	z-index: 2;
}

.jpc-hours-qty__label {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #444;
	text-transform: none;
	white-space: nowrap;
}

.jpc-hours-qty__controls {
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1px solid #d0d0d0;
	border-radius: 3px;
	background: #fff;
	overflow: hidden;
	flex-shrink: 0;
}

.jpc-hours-qty__btn {
	appearance: none;
	border: 0;
	background: #f0f0f0;
	color: #161616;
	width: 2rem;
	height: 2rem;
	min-width: 2rem;
	min-height: 2rem;
	line-height: 1;
	font-size: 1.05rem;
	cursor: pointer;
	padding: 0;
}

.jpc-hours-qty__btn:hover {
	background: #e4e4e4;
}

.jpc-hours-qty__value {
	width: 2.5rem;
	height: 2rem;
	border: 0;
	border-left: 1px solid #e8e8e8;
	border-right: 1px solid #e8e8e8;
	text-align: center;
	font-size: 0.95rem;
	font-weight: 600;
	color: #161616;
	background: #fff;
	-moz-appearance: textfield;
}

.jpc-hours-qty__value::-webkit-outer-spin-button,
.jpc-hours-qty__value::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Duration + price row: always below the hour block, never overlapping. */
.bpa-front-si-card:has(.jpc-hours-qty) .bpa-front-si-cb__specs,
.bpa-front-module--service-item:has(.jpc-hours-qty) .bpa-front-si-cb__specs,
.bpa-front-si-card.jpc-has-hours-qty .bpa-front-si-cb__specs {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 0.5rem 1rem !important;
	width: 100% !important;
	margin: 0 !important;
	padding-top: 0.15rem !important;
	position: static !important;
	clear: both !important;
	z-index: 1;
}

.bpa-front-si-card:has(.jpc-hours-qty) .bpa-front-si-cb__specs-item,
.bpa-front-module--service-item:has(.jpc-hours-qty) .bpa-front-si-cb__specs-item,
.bpa-front-si-card.jpc-has-hours-qty .bpa-front-si-cb__specs-item {
	margin: 0 !important;
}

.bpa-front-si-card:has(.jpc-hours-qty) .bpa-front-si-cb__specs-item:first-child,
.bpa-front-module--service-item:has(.jpc-hours-qty) .bpa-front-si-cb__specs-item:first-child,
.bpa-front-si-card.jpc-has-hours-qty .bpa-front-si-cb__specs-item:first-child {
	margin-right: 0 !important;
}

.bpa-front-si-card:has(.jpc-hours-qty) strong.--is-service-price,
.bpa-front-module--service-item:has(.jpc-hours-qty) strong.--is-service-price,
.bpa-front-si-card.jpc-has-hours-qty strong.--is-service-price {
	position: static !important;
	display: inline-flex !important;
	align-items: center;
	margin: 0 !important;
	line-height: 1.2 !important;
	white-space: nowrap;
}

.bpa-front-si-card.__bpa-is-selected .jpc-hours-qty,
.bpa-front-module--service-item.__bpa-is-selected .jpc-hours-qty {
	border-color: #c8b0b0;
	background: #faf6f6;
}

.bpa-front-si-card.__bpa-is-selected .jpc-hours-qty__controls,
.bpa-front-module--service-item.__bpa-is-selected .jpc-hours-qty__controls {
	border-color: #c62828;
}

@media (max-width: 520px) {
	.jpc-hours-qty {
		padding: 0.55rem 0.65rem;
	}
}
