/* ── Bookings for WooCommerce — Dark theme ───────────────────────────────── */
:root {
	--bfwc-header-bg:      #1e1e2e;
	--bfwc-header-text:    #e0e0e0;
	--bfwc-cell-bg:        #2a2a3e;
	--bfwc-cell-text:      #d0d0e0;
	--bfwc-selected-bg:    #5271ff;
	--bfwc-selected-text:  #ffffff;
	--bfwc-hover-bg:       #3a3a5a;
	--bfwc-border:         #383850;
}

/* Wrapper */
.bfwc-theme-dark .ui-datepicker {
	background: var(--bfwc-cell-bg);
	border: 1px solid var(--bfwc-border);
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
	overflow: hidden;
	padding: 0;
	margin-top: 4px;
}

/* Header */
.bfwc-theme-dark .ui-datepicker .ui-datepicker-header {
	background: var(--bfwc-header-bg);
	margin-bottom: 0;
	padding: 10px 8px;
	text-align: center;
	border-bottom: 1px solid var(--bfwc-border);
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-title {
	color: var(--bfwc-header-text);
	font-weight: 600;
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-prev:before,
.bfwc-theme-dark .ui-datepicker .ui-datepicker-next:before {
	color: var(--bfwc-header-text);
}

/* Day-of-week headers */
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar thead,
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar thead tr {
	background: var(--bfwc-header-bg);
}
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar thead th {
	background: var(--bfwc-header-bg);
	color: var(--bfwc-header-text);
	opacity: 0.6;
	font-size: 0.8em;
	font-weight: 600;
	padding: 6px 0;
	border: 0;
}

/* Cells */
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td {
	background: var(--bfwc-cell-bg);
	border: 1px solid var(--bfwc-border);
	transition: background 0.15s;
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td a,
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td span {
	color: var(--bfwc-cell-text);
	display: block;
	text-align: center;
	padding: 6px 2px;
	transition: background 0.15s, color 0.15s;
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td:hover {
	background: var(--bfwc-hover-bg);
	cursor: pointer;
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td:hover a {
	color: var(--bfwc-cell-text);
}

/* Selected / current day */
.bfwc-theme-dark .ui-datepicker .ui-datepicker-current-day {
	background: transparent;
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-current-day a,
.bfwc-theme-dark .ui-datepicker .ui-datepicker-current-day a:hover {
	background: var(--bfwc-selected-bg);
	color: var(--bfwc-selected-text) !important;
	border-radius: 6px;
}

/* Today (not selected) — visible tint using the selected colour at low opacity */
.bfwc-theme-dark .ui-datepicker .ui-datepicker-today:not(.ui-datepicker-current-day) a {
	background: color-mix(in srgb, var(--bfwc-selected-bg) 25%, transparent);
	color: var(--bfwc-cell-text) !important;
	font-weight: 600;
	border-radius: 6px;
}

/* Unselectable / past / disabled */
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.ui-datepicker-unselectable {
	background: var(--bfwc-cell-bg);
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.ui-datepicker-unselectable a,
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.ui-state-disabled span,
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.past a {
	opacity: 0.3;
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.ui-datepicker-unselectable:hover {
	background: var(--bfwc-cell-bg);
	cursor: default;
}

.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.ui-datepicker-other-month {
	opacity: 0.2;
}

/* Booked */
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.booked a,
.bfwc-theme-dark .ui-datepicker .ui-datepicker-calendar td.booked span {
	opacity: 0.25;
	text-decoration: line-through;
}

/* Optimised colours */
.bfwc-theme-dark.bfwc-optimise-colours .ui-datepicker .ui-datepicker-calendar td.fully-available { background: #1e4d2b; }
.bfwc-theme-dark.bfwc-optimise-colours .ui-datepicker .ui-datepicker-calendar td.fully-available a { color: #6fcf97; }
.bfwc-theme-dark.bfwc-optimise-colours .ui-datepicker .ui-datepicker-calendar td.part-available   { background: #4a3800; }
.bfwc-theme-dark.bfwc-optimise-colours .ui-datepicker .ui-datepicker-calendar td.part-available a { color: #f2c94c; }
.bfwc-theme-dark.bfwc-optimise-colours .ui-datepicker .ui-datepicker-calendar td.unavailable      { background: #4a1a1a; }
.bfwc-theme-dark.bfwc-optimise-colours .ui-datepicker .ui-datepicker-calendar td.unavailable a    { color: #eb5757; }

/* Wrapper table — retain original grey borders */
.bfwc-theme-dark #bfws-calendar-wrapper table,
.bfwc-theme-dark #bfws-calendar-wrapper table tbody td,
.bfwc-theme-dark #bfws-calendar-wrapper table tfoot,
.bfwc-theme-dark #bfws-calendar-wrapper table tfoot td {
	border-color: #eee;
}

/* Input fields */
.bfwc-theme-dark #bfws-calendar-wrapper input[type=text] {
	background: var(--bfwc-cell-bg);
	color: var(--bfwc-cell-text);
	border: 1px solid var(--bfwc-border);
	border-radius: 6px;
}

.bfwc-theme-dark #bfws-calendar-wrapper input[type=text]:focus {
	border-color: var(--bfwc-selected-bg);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bfwc-selected-bg) 20%, transparent);
}


.bfwc-theme-dark .bfws-booking-details {
	background: var(--bfwc-header-bg);
	color: var(--bfwc-cell-text);
	border: 1px solid var(--bfwc-border);
}
