/* Виджет корзины по датам (стили перенесены из версии 3.0 без изменений + блок v4 в конце) */
.rwm-cart-wrapper {
	background: #fff;
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.06);
	max-width: 400px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	box-sizing: border-box;
	width: 100%;
	overflow-x: hidden;
}

.rwm-cart-wrapper .rwm-cart-header {
	margin-bottom: 15px;
	text-align: center;
}

.rwm-cart-wrapper .rwm-cart-title {
	font-size: 18px;
	font-weight: 700;
	color: #222;
	text-transform: uppercase;
}

.rwm-cart-wrapper .rwm-cart-date {
	font-weight: 700;
	color: #222;
	text-transform: uppercase;
}

/* Карусель дней */
.rwm-cart-wrapper .rwm-cart-calendar {
	margin-bottom: 20px;
	width: 100%;
	overflow: hidden;
}

.rwm-cart-wrapper .rwm-cart-slider-controls {
	display: flex;
	align-items: center;
	gap: 2px;
	width: 100%;
}

.rwm-cart-wrapper .rwm-cart-slider-prev,
.rwm-cart-wrapper .rwm-cart-slider-next {
	background: none !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	font-size: 28px !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 14px !important;
	height: 36px !important;
	padding: 0 !important;
	margin: 0 !important;
	color: #7bb220 !important;
	transition: color 0.2s !important;
	flex-shrink: 0 !important;
	user-select: none !important;
}

.rwm-cart-wrapper .rwm-cart-slider-prev:hover:not(:disabled),
.rwm-cart-wrapper .rwm-cart-slider-next:hover:not(:disabled) {
	color: #e12d2e !important;
}

.rwm-cart-wrapper .rwm-cart-slider-prev:disabled,
.rwm-cart-wrapper .rwm-cart-slider-next:disabled {
	opacity: 0.4 !important;
	cursor: not-allowed !important;
}

.rwm-cart-wrapper .rwm-cart-days {
	display: grid;
	gap: 2px;
	flex: 1;
	min-width: 0;
	width: 100%;
	grid-template-columns: repeat(7, 1fr);
}

.rwm-cart-wrapper .rwm-cart-day {
	text-align: center;
	padding: 8px 2px;
	cursor: pointer;
	border-radius: 6px;
	background: transparent;
	border: none;
	transition: all 0.2s;
	font-weight: 500;
	font-size: 14px;
	color: #555;
	min-width: 0;
	white-space: nowrap;
}

.rwm-cart-wrapper .rwm-cart-day.rwm-cart-day-past,
.rwm-cart-wrapper .rwm-cart-day.rwm-cart-day-disabled {
	opacity: 0.4;
	pointer-events: none;
}

.rwm-cart-wrapper .rwm-cart-day.rwm-cart-day-active {
	background: #ffffff;
	color: #7bb220;
}

.rwm-cart-wrapper .rwm-cart-day.rwm-cart-day-active:hover {
	background: #ffffff;
	color: #E42D24;
}

.rwm-cart-wrapper .rwm-cart-day:hover:not(.rwm-cart-day-past):not(.rwm-cart-day-disabled):not(.rwm-cart-day-active) {
	background: transparent;
	color: #7bb220;
}

@media (max-width: 600px) {
	.rwm-cart-wrapper .rwm-cart-days {
		gap: 1px;
	}
	.rwm-cart-wrapper .rwm-cart-day {
		padding: 6px 1px;
		font-size: 12px;
	}
	.rwm-cart-wrapper .rwm-cart-slider-prev,
	.rwm-cart-wrapper .rwm-cart-slider-next {
		font-size: 24px !important;
		width: 22px !important;
	}
}

/* Остальные стили (товары, итоги) */
.rwm-cart-wrapper .rwm-cart-items-container {
	margin-top: 10px;
}

.rwm-cart-wrapper .rwm-cart-items {
	min-height: 100px;
	max-height: 300px;
	overflow-y: auto;
	margin-bottom: 20px;
}

.rwm-cart-wrapper .rwm-empty-cart {
	text-align: center;
	padding: 30px;
	color: #aaa;
	font-size: 16px;
}

.rwm-cart-wrapper .rwm-cart-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f0;
}

.rwm-cart-wrapper .rwm-cart-item:last-child {
	border-bottom: none;
}

.rwm-cart-wrapper .rwm-cart-item-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.rwm-cart-wrapper .rwm-cart-item-name {
	font-size: 13px !important;
	font-weight: 500;
	line-height: 17px !important;
	color: #333;
	flex: 1;
}

.rwm-cart-wrapper .rwm-remove-item {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	flex: 0 0 auto !important;
	border-radius: 50% !important;
	border: 1px solid #7bb220 !important;
	background: transparent !important;
	color: #7bb220 !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	padding: 0 !important;
	margin: 0 !important;
	box-sizing: border-box !important;
}

.rwm-cart-wrapper .rwm-remove-item:hover {
	border-color: #e12d2e !important;
	color: #e12d2e !important;
}

.rwm-cart-wrapper .rwm-cart-item-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.rwm-cart-wrapper .rwm-cart-item-qty {
	display: flex;
	align-items: center;
	gap: 3px;
}

.rwm-cart-wrapper .rwm-cart-item-qty button {
	width: 24px !important;
	height: 24px !important;
	border: none !important;
	background: transparent !important;
	color: #7bb220 !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	margin: 0 !important;
	transition: color 0.2s !important;
}

.rwm-cart-wrapper .rwm-cart-item-qty button:hover {
	color: #e12d2e !important;
}

.rwm-cart-wrapper .rwm-cart-item-qty input {
	width: 26px !important;
	height: 26px !important;
	text-align: center !important;
	border: 1px solid #ddd !important;
	border-radius: 8px !important;
	padding: 4px 0 !important;
	font-size: 12px !important;
	background: #fff !important;
	-moz-appearance: textfield !important;
}

.rwm-cart-wrapper .rwm-cart-item-qty input::-webkit-inner-spin-button,
.rwm-cart-wrapper .rwm-cart-item-qty input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.rwm-cart-wrapper .rwm-cart-item-price {
	font-size: 16px;
	font-weight: 600;
	color: #7bb220;
	white-space: nowrap;
}

.rwm-cart-wrapper .rwm-cart-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 0;
	border-top: 2px solid #eee;
	font-size: 16px;
}

.rwm-cart-wrapper .rwm-total-price {
	color: #e12d2e;
	font-weight: 700;
	font-size: 20px;
}

.rwm-cart-wrapper .rwm-cart-checkout {
	display: block;
	width: 100%;
	padding: 14px;
	background: #7bb220;
	color: white;
	text-align: center;
	text-decoration: none;
	border-radius: 5px;
	font-size: 16px;
	font-weight: 600;
	transition: background 0.2s;
	margin-top: 15px;
	border: none;
	cursor: pointer;
	box-sizing: border-box;
}

.rwm-cart-wrapper .rwm-cart-checkout:hover {
	background: #e12d2e;
	color: white;
}

@media (max-width: 600px) {
	.rwm-cart-wrapper .rwm-cart-item {
		padding: 8px 10px;
	}
	.rwm-cart-wrapper .rwm-cart-item-qty input {
		width: 36px;
	}
}

.rwm-cart-wrapper .rwm-cart-day-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-top: 1px solid #eee;
	font-size: 14px;
	color: #555;
}
.rwm-cart-wrapper .rwm-day-total-price {
	font-weight: 600;
	color: #7bb220;
}

/* ---- v4 ---- */
/* Пока изменения сохраняются — итог и кнопка полупрозрачные */
.rwm-cart-wrapper.twm-busy .rwm-cart-total,
.rwm-cart-wrapper.twm-busy .rwm-cart-day-total,
.rwm-cart-wrapper.twm-busy .rwm-cart-checkout {
	opacity: 0.55;
	transition: opacity 0.15s;
}
.rwm-cart-wrapper .rwm-cart-item.twm-removing {
	opacity: 0.35;
	transition: opacity 0.2s;
}
/* Точка под днём, на который в корзине есть блюда */
.rwm-cart-wrapper .rwm-cart-day.twm-has-items {
	text-decoration: underline;
	text-decoration-color: #e12d2e;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
}

/* Выбор даты в карточке товара */
.twm-order-date {
	margin: 0 0 12px;
	font-size: 14px;
}
.twm-order-date label {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.twm-order-date select {
	max-width: 260px;
	height: 38px;
	border-radius: 6px;
}
.twm-order-date.twm-date-warning select {
	border-color: #e12d2e;
}
.twm-order-date.twm-date-warning::after {
	content: 'На выбранную дату это блюдо не готовим — выберите другую дату.';
	display: block;
	margin-top: 6px;
	color: #e12d2e;
	font-size: 13px;
}
