/* ============================================
   Minimousse Bookings — Frontend Calendar
   ============================================ */

#mb-booking-wrap {
	margin: 0 auto 20px;
	max-width: 400px;
}

/* Calendar container */
#mb-calendar {
	border: 1px solid #ddd;
	border-radius: 10px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	user-select: none;
	background: #fff;
}

/* Header with month navigation */
.mb-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: #2d1a4a;
	color: #fff;
}

.mb-cal-header button {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 6px;
	line-height: 1;
	transition: background 0.15s;
}

.mb-cal-header button:hover {
	background: rgba(255, 255, 255, 0.15);
}

.mb-cal-header button:disabled {
	opacity: 0.3;
	cursor: default;
}

.mb-cal-month-label {
	font-size: 16px;
	font-weight: 600;
	text-transform: capitalize;
}

/* Day name headers */
.mb-cal-days-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	padding: 8px 8px 4px;
	font-size: 12px;
	font-weight: 600;
	color: #888;
}

/* Day grid */
.mb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 3px;
	padding: 4px 8px 10px;
}

.mb-cal-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
	position: relative;
	font-weight: 500;
}

.mb-cal-day:hover:not(.mb-day-disabled):not(.mb-day-booked):not(.mb-day-past) {
	background: #ede8f5;
}

/* Empty cells */
.mb-cal-day.mb-day-empty {
	cursor: default;
}

/* Past dates */
.mb-cal-day.mb-day-past {
	color: #ccc;
	cursor: default;
}

/* Unavailable / booked */
.mb-cal-day.mb-day-booked {
	background: #fee;
	color: #c44;
	cursor: not-allowed;
	text-decoration: line-through;
}

.mb-cal-day.mb-day-held {
	background: #fff3e0;
	color: #e65100;
	cursor: not-allowed;
}

.mb-cal-day.mb-day-blackout {
	background: #eee;
	color: #aaa;
	cursor: not-allowed;
}

/* Selected range */
.mb-cal-day.mb-day-selected {
	background: #2d1a4a;
	color: #fff;
}

.mb-cal-day.mb-day-in-range {
	background: #ede8f5;
	color: #2d1a4a;
	border-radius: 4px;
}

.mb-cal-day.mb-day-range-start {
	border-radius: 8px 4px 4px 8px;
}

.mb-cal-day.mb-day-range-end {
	border-radius: 4px 8px 8px 4px;
}

/* Today marker */
.mb-cal-day.mb-day-today:not(.mb-day-selected) {
	box-shadow: inset 0 0 0 2px #2d1a4a;
}

/* Loading spinner */
.mb-cal-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	color: #888;
}

.mb-cal-loading::after {
	content: '';
	width: 24px;
	height: 24px;
	border: 3px solid #ddd;
	border-top-color: #2d1a4a;
	border-radius: 50%;
	animation: mb-spin 0.6s linear infinite;
	margin-left: 10px;
}

@keyframes mb-spin {
	to { transform: rotate(360deg); }
}

/* Booking summary */
#mb-booking-summary {
	margin-top: 14px;
	padding: 14px 16px;
	background: #f8f6fb;
	border-radius: 10px;
	border: 1px solid #e8e0f0;
	font-size: 14px;
	line-height: 1.6;
}

#mb-booking-summary .mb-summary-dates {
	font-weight: 700;
	font-size: 15px;
	color: #313131;
}

#mb-booking-summary .mb-summary-pickup {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 8px;
	padding: 8px 0;
	border-top: 1px solid #e8e0f0;
	font-size: 15px;
	color: #313131;
}

#mb-booking-summary .mb-summary-total {
	font-size: 18px;
	font-weight: 700;
	color: #2d1a4a;
	margin-top: 6px;
}

/* Hide stock status on bookable products */
.single-product.mb-bookable .summary .stock {
	display: none !important;
}

/* Center the add-to-cart form (calendar + button) */
.single-product form.cart {
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Override add-to-cart button when no dates selected */
.mb-btn-disabled {
	opacity: 0.5 !important;
	pointer-events: none !important;
}
