/* ---------- Front-end: product page ---------- */

.mb-booking-fields {
	margin-bottom: 16px;
}

.mb-date-field {
	position: relative;
}

.mb-date-trigger {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid #999;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95em;
}

.mb-date-trigger:hover {
	border-color: #333;
}

.mb-calendar-popup {
	/* "fixed" rather than "absolute": some theme containers (overflow, stacking
	   context) were clipping or hiding the popup. With "fixed", positioned via JS
	   relative to the button, we sidestep that problem. */
	position: fixed;
	z-index: 99999;
	width: 280px;
	background: #fff;
	border: 1px solid #999;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	padding: 10px;
}

.mb-calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.mb-calendar-title {
	font-weight: 600;
	text-transform: capitalize;
}

.mb-calendar-nav-btn {
	border: none;
	background: none;
	font-size: 1.1em;
	line-height: 1;
	cursor: pointer;
	padding: 2px 8px;
}

.mb-calendar-nav-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.mb-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.mb-calendar-day-name {
	text-align: center;
	font-size: 0.75em;
	font-weight: 600;
	color: #666;
	padding: 4px 0;
}

.mb-calendar-day {
	border: none;
	background: none;
	padding: 6px 0;
	text-align: center;
	font-size: 0.9em;
	border-radius: 3px;
	cursor: pointer;
}

.mb-day-empty {
	cursor: default;
}

.mb-day-available:hover {
	background: #f0f0f0;
}

.mb-day-closed,
.mb-day-disabled {
	color: #bbb;
	cursor: not-allowed;
	text-decoration: line-through;
}

.mb-day-full {
	color: #b32d2e;
	background: #fbeaea;
	cursor: not-allowed;
	text-decoration: line-through;
}

.mb-day-selected {
	background: #333;
	color: #fff;
}

.mb-creneaux-wrapper {
	margin-top: 10px;
}

.mb-creneaux-hint {
	color: #666;
	font-size: 0.9em;
}

.mb-no-slot {
	color: #b32d2e;
	font-weight: 600;
}

.mb-creneaux-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.mb-creneau-btn {
	padding: 8px 16px;
	border: 1px solid #999;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95em;
}

.mb-creneau-btn:hover {
	border-color: #333;
}

.mb-creneau-btn.mb-selected {
	background: #333;
	color: #fff;
	border-color: #333;
}

button.mb-disabled,
.mb-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- Admin: calendar ---------- */

.mb-wrap .mb-calendar-nav {
    display: flex;
    align-items: center;
	gap: 12px;
	margin: 12px 0 20px;
}

.mb-calendar-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.mb-calendar-table th {
	background: #f0f0f1;
	padding: 8px;
	text-align: center;
	border: 1px solid #dcdcde;
}

.mb-day-cell {
	vertical-align: top;
	border: 1px solid #dcdcde;
	height: 110px;
	width: 14.28%;
	padding: 6px;
	overflow: hidden;
}

.mb-empty-cell {
	background: #fafafa;
	border: 1px solid #dcdcde;
}

.mb-day-number {
	font-weight: 600;
	margin-bottom: 4px;
}

.mb-day-closed {
	background: #f7f7f7;
}

.mb-day-open {
	background: #fff;
}

.mb-day-exception {
	font-size: 0.75em;
	color: #b32d2e;
	font-weight: 600;
	margin-bottom: 4px;
}

.mb-day-bookings {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.75em;
}

.mb-day-bookings li {
	margin-bottom: 2px;
}

/* ---------- Admin: settings ---------- */

.mb-textarea {
	display: block;
	font-family: monospace;
}

.mb-weekday-table td {
	vertical-align: top;
	padding: 10px 8px;
}

.mb-exception-form {
	display: flex;
	gap: 20px;
	align-items: flex-end;
	flex-wrap: wrap;
	background: #fff;
	padding: 16px;
	border: 1px solid #dcdcde;
	margin-bottom: 20px;
}

.mb-exception-form label {
	display: flex;
	flex-direction: column;
	font-weight: 600;
	font-size: 0.9em;
	gap: 4px;
}

.mb-status {
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 0.85em;
}

.mb-status-pending {
	background: #fff3cd;
	color: #856404;
}

.mb-status-confirmed {
	background: #d4edda;
	color: #155724;
}

.mb-status-cancelled {
	background: #f8d7da;
	color: #721c24;
	text-decoration: line-through;
}
