/* Big Charlie's Scheduler — Frontend Styles */

/* ============================================================
   Shared: step headings, date/time pickers, buttons
   ============================================================ */

.bcs-step h3,
.bcs-checkout-pickup .bcs-step h4 {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0;
}

.bcs-link-btn {
	background: none;
	border: none;
	color: #2271b1;
	cursor: pointer;
	font-size: 0.85rem;
	text-decoration: underline;
	padding: 0;
}

.bcs-selected-date {
	font-weight: 600;
	color: #222;
	margin: -0.25rem 0 1rem;
}

/* ============================================================
   Date list
   ============================================================ */

.bcs-date-list {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	max-height: 280px;
	overflow-y: auto;
	padding-right: 4px;
}

.bcs-date-btn {
	background: #f7f7f7;
	border: 2px solid #ddd;
	border-radius: 6px;
	padding: 0.75rem 1rem;
	text-align: left;
	cursor: pointer;
	font-size: 1rem;
	transition: border-color 0.15s, background 0.15s;
	width: 100%;
}

.bcs-date-btn:hover,
.bcs-date-btn:focus {
	border-color: #2271b1;
	background: #f0f6fc;
	outline: none;
}

.bcs-date-btn.is-selected {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
}

/* ============================================================
   Time list
   ============================================================ */

.bcs-time-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	max-height: 240px;
	overflow-y: auto;
}

.bcs-time-btn {
	background: #f7f7f7;
	border: 2px solid #ddd;
	border-radius: 6px;
	padding: 0.6rem 1.1rem;
	cursor: pointer;
	font-size: 0.95rem;
	min-width: 90px;
	text-align: center;
	transition: border-color 0.15s, background 0.15s;
}

.bcs-time-btn:hover,
.bcs-time-btn:focus {
	border-color: #2271b1;
	background: #f0f6fc;
	outline: none;
}

.bcs-time-btn.is-selected {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
}

/* ============================================================
   Loading / empty states
   ============================================================ */

.bcs-loading {
	color: #888;
	font-style: italic;
}

.bcs-no-slots,
.bcs-no-dates {
	color: #c00;
	font-size: 0.95rem;
}

/* ============================================================
   Shared buttons
   ============================================================ */

.bcs-btn {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	cursor: pointer;
	font-weight: 600;
	transition: opacity 0.15s;
	text-decoration: none;
	box-sizing: border-box;
}

.bcs-btn:disabled {
	opacity: 0.45;
	cursor: default;
}

.bcs-btn--primary {
	background: #2271b1;
	color: #fff;
}

.bcs-btn--primary:not(:disabled):hover {
	background: #135e96;
	color: #fff;
}

.bcs-btn--secondary {
	background: #f7f7f7;
	color: #333;
	border: 1px solid #ccc;
}

.bcs-btn--secondary:hover {
	background: #eee;
}

/* ============================================================
   Checkout pickup section
   ============================================================ */

.bcs-checkout-pickup {
	background: #f9f9f9;
	border: 2px solid #ddd;
	border-radius: 8px;
	padding: 1.75rem;
	margin-bottom: 2rem;
}

.bcs-checkout-pickup-title {
	margin: 0 0 0.4rem;
	font-size: 1.3rem;
}

.bcs-checkout-pickup-intro {
	color: #555;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

.bcs-checkout-pickup .bcs-step h4 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
}

.bcs-checkout-pickup .bcs-selected-date {
	margin-bottom: 0.75rem;
}

/* ============================================================
   Floating cart — toggle button
   ============================================================ */

.bcs-cart-toggle {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 10001;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #e62e2d;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
	transition: background 0.15s, transform 0.15s;
}

.bcs-cart-toggle:hover {
	background: #c4211f;
	transform: scale(1.06);
}

.bcs-cart-toggle svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.bcs-cart-count {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #fff;
	color: #e62e2d;
	font-size: 0.7rem;
	font-weight: 700;
	min-width: 20px;
	height: 20px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	line-height: 1;
	pointer-events: none;
}

/* ============================================================
   Floating cart — backdrop
   ============================================================ */

.bcs-cart-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.bcs-cart-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

/* ============================================================
   Floating cart — slide-in panel
   ============================================================ */

.bcs-cart-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 380px;
	max-width: 100vw;
	background: #1c1c1c;
	color: #fff;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}

.bcs-cart-panel.is-open {
	transform: translateX(0);
}

.bcs-cart-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	flex-shrink: 0;
}

.bcs-cart-panel-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
}

.bcs-cart-close {
	background: none;
	border: none;
	color: #aaa;
	font-size: 1.4rem;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	line-height: 1;
	transition: color 0.15s;
}

.bcs-cart-close:hover {
	color: #fff;
}

/* Scrollable item list */
.bcs-cart-items {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.bcs-cart-empty {
	color: rgba(255, 255, 255, 0.45);
	text-align: center;
	margin-top: 2rem;
	font-style: italic;
}

/* Individual cart item row */
.bcs-cart-item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bcs-cart-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.bcs-cart-item.is-updating {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s;
}

.bcs-cart-item-img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 4px;
	flex-shrink: 0;
}

.bcs-cart-item-img--placeholder {
	display: block;
	width: 64px;
	height: 64px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 4px;
	flex-shrink: 0;
}

.bcs-cart-item-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.bcs-cart-item-name {
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bcs-cart-item-name:hover {
	text-decoration: underline;
}

.bcs-cart-item-price {
	color: rgba(255, 255, 255, 0.65);
	font-size: 0.9rem;
}

.bcs-cart-item-controls {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.35rem;
}

.bcs-cart-qty-btn {
	width: 28px;
	height: 28px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	line-height: 1;
	padding: 0;
	flex-shrink: 0;
	transition: background 0.15s;
}

.bcs-cart-qty-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.bcs-cart-qty {
	width: 44px;
	text-align: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	border-radius: 4px;
	padding: 4px;
	font-size: 0.9rem;
}

/* Remove browser spinner on number input (all browsers) */
.bcs-cart-qty {
	-moz-appearance: textfield;
}

.bcs-cart-qty::-webkit-inner-spin-button,
.bcs-cart-qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

.bcs-cart-remove {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.35);
	font-size: 0.8rem;
	cursor: pointer;
	padding: 0;
	margin-left: auto;
	text-decoration: underline;
	transition: color 0.15s;
	flex-shrink: 0;
}

.bcs-cart-remove:hover {
	color: #e62e2d;
}

/* Panel footer: subtotal + CTA buttons */
.bcs-cart-panel-footer {
	padding: 1.25rem 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	flex-shrink: 0;
}

.bcs-cart-subtotal {
	font-size: 1.05rem;
	font-weight: 600;
	color: #fff;
	text-align: right;
}

.bcs-cart-checkout-btn {
	text-align: center;
	background: #e62e2d !important;
	color: #fff !important;
	border: none !important;
}

.bcs-cart-checkout-btn:hover {
	background: #c4211f !important;
	color: #fff !important;
}

.bcs-cart-view-btn {
	text-align: center;
	background: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	color: rgba(255, 255, 255, 0.7) !important;
}

.bcs-cart-view-btn:hover {
	border-color: rgba(255, 255, 255, 0.6) !important;
	color: #fff !important;
}

/* ============================================================
   Product carousel
   ============================================================ */

/* Outer wrap: arrow | viewport | arrow, all in a row */
.bcs-carousel-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}

/* Viewport clips the sliding track */
.bcs-carousel-viewport {
	overflow: hidden;
	flex: 1;
	min-width: 0; /* prevents flex blowout */
}

/* Arrow buttons sit outside the overflow-hidden viewport */
.bcs-carousel-arrow {
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.15);
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	width: 44px;
	height: 44px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s, border-color 0.15s;
}

/* CSS-drawn chevron — no font dependency */
.bcs-carousel-arrow::before {
	content: '';
	display: block;
	width: 10px;
	height: 10px;
	border-style: solid;
	border-color: #fff;
}

.bcs-carousel-arrow--prev::before {
	border-width: 0 0 2px 2px;
	transform: rotate(45deg);
	margin-left: 4px;
}

.bcs-carousel-arrow--next::before {
	border-width: 2px 2px 0 0;
	transform: rotate(45deg);
	margin-right: 4px;
}

.bcs-carousel-arrow:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.3);
	border-color: #fff;
}

.bcs-carousel-arrow:disabled {
	opacity: 0;
	cursor: default;
	pointer-events: none;
}

/* The sliding track — JS sets display:flex, flex-wrap:nowrap, gap, and transform */
.bcs-carousel {
	/* no grid; JS takes over layout entirely */
}

.bcs-carousel-item {
	flex: 0 0 auto; /* JS sets explicit width */
	display: flex;
	flex-direction: column;
	background: transparent;
	border: none;
}

/* Fixed-height image box: all cards the same height, image letterboxed via contain */
.bcs-carousel-img-wrapper {
	height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: transparent;
}

/* !important overrides any WooCommerce theme styles on .wp-post-image */
.bcs-carousel-img-wrapper img {
	max-width: 100% !important;
	max-height: 100% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain !important;
	display: block;
	transition: transform 0.3s;
}

.bcs-carousel-img-link:hover img {
	transform: scale(1.04);
}

.bcs-carousel-info {
	padding: 0.6rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	flex: 1;
	text-align: center;
}

.bcs-carousel-title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
}

.bcs-carousel-title a {
	color: #fff;
	text-decoration: none;
}

.bcs-carousel-title a:hover {
	text-decoration: underline;
}

.bcs-carousel-price {
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 0.5rem;
}

/* Override WooCommerce price colours inside the carousel */
.bcs-carousel-price .woocommerce-Price-amount,
.bcs-carousel-price ins .woocommerce-Price-amount {
	color: rgba(255, 255, 255, 0.85) !important;
}

.bcs-carousel-price del,
.bcs-carousel-price del .woocommerce-Price-amount {
	color: rgba(255, 255, 255, 0.45) !important;
}

.bcs-carousel-atc {
	margin-top: auto;
}

/* Hide the "View Cart" link WooCommerce inserts after a successful add */
.bcs-carousel-atc .added_to_cart {
	display: none !important;
}

/* Loading state while WooCommerce's AJAX add-to-cart is in flight */
.bcs-carousel-atc .button.loading,
.bcs-carousel-atc a.button.loading {
	opacity: 0.55;
	cursor: wait;
	pointer-events: none;
}

/* Success state — shown for 3 s after a successful add */
.bcs-carousel-atc .button.bcs-btn-added,
.bcs-carousel-atc a.button.bcs-btn-added {
	background: #2a7a2a !important;
	color: #fff !important;
	pointer-events: none;
}

/* Red Add to Cart button, full width */
.bcs-carousel-atc .button,
.bcs-carousel-atc a.button {
	display: block;
	width: 100%;
	text-align: center;
	padding: 0.65rem 1rem;
	background: #e62e2d !important;
	color: #fff !important;
	border: none !important;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background 0.15s;
	box-sizing: border-box;
}

.bcs-carousel-atc .button:hover,
.bcs-carousel-atc a.button:hover {
	background: #c4211f !important;
	color: #fff !important;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Stack mode: on mobile, items flow vertically instead of carouseling */
@media (max-width: 600px) {
	.bcs-carousel-wrap--stack-mobile {
		flex-direction: column;
	}

	.bcs-carousel-wrap--stack-mobile .bcs-carousel-viewport {
		overflow: visible;
	}

	.bcs-carousel-wrap--stack-mobile .bcs-carousel-item {
		width: 100% !important;
		margin-bottom: 64px;
	}

	.bcs-carousel-wrap--stack-mobile .bcs-carousel-item:last-child {
		margin-bottom: 0;
	}
}
