/* ---------------------------------------------------------------------
   WC Delivery Order Limits — front-end widget styling
   Palette: white surface, soft gray borders, orange (#f7941d) accents,
   red for unavailable dates. Used only by the single product page widget.
--------------------------------------------------------------------- */

.wcdol-widget {
	margin: 20px 0;
	max-width: 480px;
}

.wcdol-widget label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #1d2327;
}

.wcdol-widget .wcdol-product-date,
.wcdol-widget input[type='text'].input-text,
.wcdol-widget .wcdol-time-select,
.wcdol-widget select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #d5d9de;
	border-radius: 6px;
	font-size: 15px;
	color: #333;
	background-color: #fff;
}

.wcdol-widget .wcdol-product-date {
	padding-right: 42px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'><path fill='%23f7941d' d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.wcdol-widget .wcdol-time-select {
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M0 0l6 8 6-8z' fill='%23555'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.wcdol-widget .wcdol-field {
	margin-bottom: 16px;
}

/* ---- Flatpickr theme override to match the reference screenshot ---- */

.flatpickr-calendar.wcdol-calendar,
.flatpickr-calendar {
	box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.12 );
	border-radius: 8px;
	border: 1px solid #e6e8eb;
	width: 320px;
}

.flatpickr-months {
	padding: 10px 8px 0;
}

.flatpickr-current-month {
	font-weight: 600;
	color: #1d2327;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
	font-weight: 600;
}

.flatpickr-weekdays {
	margin-top: 6px;
}

span.flatpickr-weekday {
	color: #6b7280;
	font-weight: 600;
	font-size: 12px;
}

.flatpickr-day {
	border-radius: 6px;
	color: #333;
}

.flatpickr-day.today {
	border-color: #f7941d;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
	background: #f7941d;
	border-color: #f7941d;
	color: #fff;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
	color: #c6cad0 !important;
	cursor: not-allowed;
	text-decoration: line-through;
}

.flatpickr-day.nextMonthDay:not(.flatpickr-disabled),
.flatpickr-day.prevMonthDay:not(.flatpickr-disabled) {
	text-decoration: none;
}

/* Future dates that are fully booked / unavailable (not simply past days) are shown in red */
.flatpickr-day.wcdol-unavailable {
	color: #e53935 !important;
	text-decoration: none;
}

/* ---------------------------------------------------------------------
   Popup modal shown when a disabled date is selected
--------------------------------------------------------------------- */

.wcdol-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.wcdol-modal.is-visible {
	display: flex;
}

.wcdol-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
}

.wcdol-modal__box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 28px 28px 22px;
	max-width: 380px;
	width: calc( 100% - 40px );
	box-shadow: 0 12px 32px rgba( 0, 0, 0, 0.2 );
	text-align: center;
}

.wcdol-modal__title {
	margin: 0 0 10px;
	color: #c0392b;
	font-size: 18px;
}

.wcdol-modal__message {
	margin: 0 0 20px;
	color: #333;
	line-height: 1.5;
}

.wcdol-modal__ok {
	background: #f7941d;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 24px;
	font-weight: 600;
	cursor: pointer;
}

.wcdol-modal__ok:hover {
	background: #d97e0f;
}
