.cbw-bm-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.cbw-bm-box {
	background: #fff;
	border-radius: 18px;
	padding: 32px;
	width: 100%;
	max-width: 460px;
	position: relative;
	text-align: right;
	direction: rtl;
	font-family: inherit;
	max-height: 92vh;
	overflow-y: auto;
	overflow-x: hidden;
	box-sizing: border-box;
}

.cbw-bm-box * {
	box-sizing: border-box;
	min-width: 0;
}

.cbw-bm-calendar {
	width: 100%;
}

.cbw-bm-title {
	margin: 0 0 20px;
	font-size: 20px;
	color: #1f7a4d;
	font-weight: 700;
}

.cbw-bm-close {
	position: absolute;
	top: 16px;
	left: 18px;
	background: #f4f4f4;
	border: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.cbw-bm-close:hover {
	background: #e8e8e8;
}

.cbw-bm-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.cbw-bm-month-label {
	font-weight: 700;
	color: #222;
	font-size: 17px;
}

.cbw-bm-nav {
	background: #f1f9f4;
	border: none;
	color: #1f7a4d;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	flex-shrink: 0;
}

.cbw-bm-nav:hover {
	background: #dcf0e4;
}

.cbw-bm-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	font-size: 12.5px;
	color: #999;
	margin-bottom: 8px;
	font-weight: 600;
}

.cbw-bm-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}

.cbw-bm-day {
	aspect-ratio: 1;
	border: none;
	background: transparent;
	border-radius: 10px;
	font-size: 14.5px;
	cursor: default;
	color: #ccc;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
}

.cbw-bm-day-empty {
	visibility: hidden;
}

.cbw-bm-day-disabled {
	color: #d5d5d5;
}

.cbw-bm-day-available {
	color: #1f7a4d;
	background: #f1f9f4;
	font-weight: 700;
	cursor: pointer;
}

.cbw-bm-day-available:hover {
	background: #dcf0e4;
}

.cbw-bm-day-selected {
	background: #1f7a4d !important;
	color: #fff !important;
}

.cbw-bm-times {
	display: none;
	margin-top: 22px;
}

.cbw-bm-times-visible {
	display: block;
}

.cbw-bm-times-label {
	font-size: 14.5px;
	font-weight: 700;
	margin: 0 0 10px;
	color: #444;
}

.cbw-bm-times-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cbw-bm-time-btn {
	border: 1.5px solid #dcdcdc;
	background: #fff;
	border-radius: 10px;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
	color: #333;
	min-height: 42px;
}

.cbw-bm-time-btn:hover {
	border-color: #1f7a4d;
}

.cbw-bm-time-selected {
	background: #1f7a4d;
	border-color: #1f7a4d;
	color: #fff;
}

.cbw-bm-error {
	display: none;
	color: #c0392b;
	font-size: 13.5px;
	margin-top: 14px;
}

.cbw-bm-error-visible {
	display: block;
}

.cbw-bm-confirm {
	margin-top: 24px;
	width: 100%;
	text-align: center;
	padding: 15px !important;
	font-size: 16px !important;
	background: #1f7a4d;
	color: #fff;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 700;
	min-height: 50px;
}

.cbw-bm-confirm:hover:not(:disabled) {
	background: #16603b;
}

.cbw-bm-confirm:disabled {
	background: #b3b3b3;
	cursor: not-allowed;
}

/* ===== تابلت ===== */
@media (max-width: 900px) {
	.cbw-bm-box {
		max-width: 420px;
		padding: 28px;
	}
}

/* ===== موبايل ===== */
@media (max-width: 600px) {
	.cbw-bm-overlay {
		padding: 0;
		align-items: flex-end;
	}

	.cbw-bm-box {
		max-width: 100%;
		width: 100%;
		max-height: 94vh;
		border-radius: 20px 20px 0 0;
		padding: 24px 18px 28px;
	}

	.cbw-bm-title {
		font-size: 18px;
		margin-bottom: 16px;
		padding-left: 30px;
	}

	.cbw-bm-close {
		top: 12px;
		left: 12px;
		width: 32px;
		height: 32px;
		font-size: 20px;
	}

	.cbw-bm-month-label {
		font-size: 16px;
	}

	.cbw-bm-day {
		font-size: 14px;
		min-height: 38px;
	}

	.cbw-bm-days {
		gap: 4px;
	}

	.cbw-bm-time-btn {
		flex: 1 1 calc(50% - 5px);
		text-align: center;
	}

	.cbw-bm-confirm {
		position: sticky;
		bottom: 0;
	}
}

/* شاشات صغيرة جداً */
@media (max-width: 360px) {
	.cbw-bm-box {
		padding: 20px 14px 24px;
	}

	.cbw-bm-day {
		font-size: 13px;
		min-height: 34px;
	}

	.cbw-bm-nav {
		width: 32px;
		height: 32px;
	}
}
