/* Bookings > Calendar (wp-admin). */
.w2dc-bcal {
	--bcal-primary: var(--w2dc-primary, #2271b1);
	--bcal-line: #dcdcde;
	--bcal-muted: #646970;
	margin-top: 12px;
}
.w2dc-bcal__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
.w2dc-bcal__resource {
	min-width: 220px;
}
.w2dc-bcal__edit {
	text-decoration: none;
	font-size: 16px;
}
.w2dc-bcal__views,
.w2dc-bcal__nav {
	display: flex;
	gap: 4px;
}
.w2dc-bcal__title {
	font-size: 18px;
	font-weight: 600;
	text-transform: capitalize;
	margin-right: auto;
}
.w2dc-bcal__toggle {
	color: var(--bcal-muted);
}
.w2dc-bcal__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 16px;
	align-items: start;
}
@media (max-width: 1100px) {
	.w2dc-bcal__body {
		grid-template-columns: 1fr;
	}
}
.w2dc-bcal__main {
	transition: opacity 0.15s;
	min-width: 0;
}
.w2dc-bcal__main.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

/* ---- several months / weeks ---- */
.w2dc-bcal__span-sel {
	min-width: 110px;
}
.w2dc-bcal__months.is-multi {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
	gap: 14px 16px;
	align-items: start;
}
.w2dc-bcal__weeks.is-multi {
	display: grid;
	gap: 10px;
}
.w2dc-bcal__mtitle {
	font-weight: 600;
	font-size: 14px;
	margin: 0 0 6px;
	text-transform: capitalize;
}
.w2dc-bcal__weeks .w2dc-bcal__mtitle {
	margin: 6px 0 0;
}
/* Year separator: a full-width rule with the year, before January. */
.w2dc-bcal__year {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	font-weight: 700;
	color: var(--bcal-primary);
}
.w2dc-bcal__year::after {
	content: "";
	flex: 1;
	border-top: 2px solid var(--bcal-primary);
	opacity: 0.35;
}
/* New year inside the month grid: a line along January's left edge (in the
   column gap) and the year above its title - the flow of months stays whole. */
.w2dc-bcal__mbox {
	position: relative;
}
.w2dc-bcal__months.is-multi .w2dc-bcal__mtitle {
	min-height: 18px;
}
.w2dc-bcal__mbox.is-year-start::before {
	content: "";
	position: absolute;
	left: -9px;
	top: 0;
	bottom: 0;
	width: 2px;
	border-radius: 1px;
	background: var(--bcal-primary);
	opacity: 0.55;
}
.w2dc-bcal__ymark {
	position: absolute;
	top: -2px;
	right: 0;
	padding: 0 8px;
	border-radius: 10px;
	background: var(--bcal-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
}
.w2dc-bcal__month.is-compact .w2dc-bcal__cell {
	min-height: 64px;
}
.w2dc-bcal__month.is-compact .w2dc-bcal__chip {
	font-size: 11px;
	padding: 1px 4px;
}
.w2dc-bcal__month.is-compact .w2dc-bcal__tag {
	display: none;
}
.w2dc-bcal__cell.is-blank {
	background: #fafafa;
	cursor: default;
}
.w2dc-bcal__cell.is-blank:hover {
	background: #fafafa;
}
/* Carousel: the window slides in vertically - from below going forward,
   from above going back (time runs down the page in the stacked views). */
.w2dc-bcal__months.is-slide-next,
.w2dc-bcal__weeks.is-slide-next {
	animation: w2dc-bcal-in-next 0.25s ease-out;
}
.w2dc-bcal__months.is-slide-prev,
.w2dc-bcal__weeks.is-slide-prev {
	animation: w2dc-bcal-in-prev 0.25s ease-out;
}
@keyframes w2dc-bcal-in-next {
	from { transform: translateY(40px); opacity: 0.2; }
	to { transform: none; opacity: 1; }
}
@keyframes w2dc-bcal-in-prev {
	from { transform: translateY(-40px); opacity: 0.2; }
	to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.w2dc-bcal__months,
	.w2dc-bcal__weeks {
		animation: none !important;
	}
}

/* ---- month ---- */
.w2dc-bcal__month {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid var(--bcal-line);
	border-left: 1px solid var(--bcal-line);
	background: #fff;
}
.w2dc-bcal__wd {
	padding: 6px 8px;
	font-weight: 600;
	color: var(--bcal-muted);
	border-right: 1px solid var(--bcal-line);
	border-bottom: 1px solid var(--bcal-line);
	background: #f6f7f7;
}
.w2dc-bcal__cell {
	min-height: 104px;
	padding: 4px 0 6px;
	border-right: 1px solid var(--bcal-line);
	border-bottom: 1px solid var(--bcal-line);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.w2dc-bcal__cell:hover {
	background: #f6f7f7;
}
.w2dc-bcal__cell.is-other {
	background: #fbfbfb;
}
.w2dc-bcal__cell.is-other .w2dc-bcal__num {
	opacity: 0.45;
}
.w2dc-bcal__cell.is-closed {
	background: repeating-linear-gradient(-45deg, #fff, #fff 6px, #f3f3f4 6px, #f3f3f4 12px);
}
.w2dc-bcal__cell.is-gap {
	box-shadow: inset 0 0 0 2px #dba617;
}
.w2dc-bcal__cell.is-active {
	box-shadow: inset 0 0 0 2px var(--bcal-primary);
}
.w2dc-bcal__num {
	padding: 0 8px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
}
.w2dc-bcal__cell.is-today .w2dc-bcal__num {
	color: var(--bcal-primary);
}
.w2dc-bcal__tag {
	font-weight: 400;
	font-size: 11px;
	color: var(--bcal-muted);
}
.w2dc-bcal__more {
	padding: 0 8px;
	font-size: 11px;
	color: var(--bcal-muted);
}

/* ---- chips (month) and blocks (week) ---- */
.w2dc-bcal__chip {
	display: block;
	margin: 0 4px;
	padding: 2px 6px;
	border: 0;
	border-left: 3px solid currentColor;
	border-radius: 3px;
	font-size: 12px;
	line-height: 1.4;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	background: #eef4fa;
	color: #135e96;
	min-width: 0;
}
/* Date bookings run across days as one bar. */
.w2dc-bcal__month .w2dc-bcal__chip {
	margin: 0 -1px;
	border-radius: 0;
	border-left: 0;
}
.w2dc-bcal__month .w2dc-bcal__chip.is-first {
	margin-left: 4px;
	border-left: 3px solid currentColor;
	border-radius: 3px 0 0 3px;
}
.w2dc-bcal__month .w2dc-bcal__chip.is-last {
	margin-right: 4px;
	border-radius: 0 3px 3px 0;
}
.w2dc-bcal__month .w2dc-bcal__chip.is-first.is-last {
	border-radius: 3px;
}
/* The booking open in the sidebar. */
.w2dc-bcal__chip.is-selected {
	box-shadow: inset 0 0 0 2px var(--bcal-primary);
	position: relative;
	z-index: 4;
	font-weight: 600;
}
.w2dc-bcal__block.is-selected {
	box-shadow: 0 0 0 2px var(--bcal-primary), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.w2dc-bcal__history .is-loading {
	list-style: none;
	color: var(--bcal-muted);
}
.is-st-confirmed,
.is-st-completed { background: #e7f5ea; color: #00703c; }
.is-st-pending,
.is-st-approved { background: #fcf3e3; color: #996800; }
.is-st-request { background: #f0edfa; color: #5b3fb3; }
.is-st-hold { background: #f0f0f1; color: #50575e; }
.is-st-cancelled,
.is-st-declined,
.is-st-expired,
.is-st-no_show { background: #fbeaea; color: #b32d2e; text-decoration: line-through; }
.w2dc-bcal__chip.is-block,
.w2dc-bcal__item.is-block,
.w2dc-bcal__badge.is-block,
.w2dc-bcal__lg.is-block {
	background: repeating-linear-gradient(-45deg, #e5e5e5, #e5e5e5 5px, #d5d5d5 5px, #d5d5d5 10px);
	color: #3c434a;
	text-decoration: none;
}

/* ---- week ---- */
.w2dc-bcal__week {
	background: #fff;
	border: 1px solid var(--bcal-line);
}
.w2dc-bcal__whead,
.w2dc-bcal__wbody {
	display: grid;
	grid-template-columns: 52px repeat(7, minmax(0, 1fr));
}
.w2dc-bcal__whead {
	border-bottom: 1px solid var(--bcal-line);
	background: #f6f7f7;
}
.w2dc-bcal__wday {
	border: 0;
	border-left: 1px solid var(--bcal-line);
	background: transparent;
	padding: 8px 4px;
	font-weight: 600;
	cursor: pointer;
	text-transform: capitalize;
}
.w2dc-bcal__wday.is-today {
	color: var(--bcal-primary);
}
.w2dc-bcal__wday.is-closed {
	color: var(--bcal-muted);
}
.w2dc-bcal__gutter {
	position: relative;
}
.w2dc-bcal__hour {
	position: absolute;
	right: 6px;
	transform: translateY(-50%);
	font-size: 11px;
	color: var(--bcal-muted);
}
.w2dc-bcal__hour:first-child {
	transform: none;
}
.w2dc-bcal__col {
	position: relative;
	border-left: 1px solid var(--bcal-line);
	background: repeating-linear-gradient(-45deg, #fafafa, #fafafa 6px, #f1f1f2 6px, #f1f1f2 12px);
	cursor: copy;
}
.w2dc-bcal__open {
	position: absolute;
	left: 0;
	right: 0;
	background: #fff;
}
.w2dc-bcal__line {
	position: absolute;
	left: 0;
	right: 0;
	border-top: 1px solid #f0f0f1;
	pointer-events: none;
}
.w2dc-bcal__block {
	position: absolute;
	margin: 1px 2px;
	box-sizing: border-box;
	white-space: normal;
	z-index: 2;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.w2dc-bcal__now {
	position: absolute;
	left: 0;
	right: 0;
	border-top: 2px solid #d63638;
	z-index: 3;
	pointer-events: none;
}

/* ---- legend ---- */
.w2dc-bcal__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 10px;
	color: var(--bcal-muted);
	font-size: 12px;
}
.w2dc-bcal__lg {
	background: transparent !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none !important;
}
.w2dc-bcal__lg i {
	display: inline-block;
	width: 14px;
	height: 10px;
	border-radius: 2px;
	background: currentColor;
	opacity: 0.6;
}
.w2dc-bcal__lg.is-block i {
	background: repeating-linear-gradient(-45deg, #e5e5e5, #e5e5e5 3px, #c3c4c7 3px, #c3c4c7 6px);
	opacity: 1;
}
.w2dc-bcal__lg.is-gap-lg i {
	background: transparent;
	box-shadow: inset 0 0 0 2px #dba617;
	opacity: 1;
}

/* ---- sidebar ---- */
.w2dc-bcal__side {
	position: sticky;
	top: 46px;
	background: #fff;
	border: 1px solid var(--bcal-line);
	border-radius: 4px;
	padding: 14px 16px;
	max-height: calc(100vh - 70px);
	overflow: auto;
}
.w2dc-bcal__hint {
	color: var(--bcal-muted);
	margin: 0;
}
.w2dc-bcal__shead {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}
.w2dc-bcal__shead h2 {
	margin: 0 0 8px;
	font-size: 16px;
	text-transform: capitalize;
}
.w2dc-bcal__x {
	border: 0;
	background: transparent;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--bcal-muted);
}
.w2dc-bcal__msg:empty {
	display: none;
}
.w2dc-bcal__msg.is-error {
	color: #b32d2e;
	margin-bottom: 8px;
}
.w2dc-bcal__sec {
	border-top: 1px solid #f0f0f1;
	padding-top: 10px;
	margin-top: 10px;
}
.w2dc-bcal__sec h3 {
	margin: 0 0 6px;
	font-size: 13px;
}
.w2dc-bcal__sec summary {
	cursor: pointer;
	font-weight: 600;
}
.w2dc-bcal__gapnote {
	color: #996800;
}
/* A button whose request is running: spinner in front of the label. */
.w2dc-bcal button.is-busy {
	cursor: progress;
	opacity: 0.85;
}
.w2dc-bcal button.is-busy::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin: 0 6px -1px 0;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: w2dc-bcal-spin 0.7s linear infinite;
	vertical-align: -1px;
	box-sizing: border-box;
}
@keyframes w2dc-bcal-spin {
	to { transform: rotate(360deg); }
}
.w2dc-bcal__hint-sm {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--bcal-muted);
}
.w2dc-bcal__warn {
	margin: 6px 0 0;
	padding: 6px 8px;
	background: #fcf0f1;
	border-left: 3px solid #d63638;
	color: #8a2424;
}
.w2dc-bcal__state {
	margin: 0 0 4px;
}
.w2dc-bcal__state.is-open strong {
	color: #00703c;
}
.w2dc-bcal__state.is-closed strong {
	color: #b32d2e;
}
.w2dc-bcal__state span,
.w2dc-bcal__sub {
	color: var(--bcal-muted);
}
.w2dc-bcal__sub {
	margin: 0 0 4px;
}
.w2dc-bcal__hours {
	margin-top: 10px;
	padding: 10px;
	background: #f6f7f7;
	border-radius: 4px;
}
.w2dc-bcal__ivs {
	display: grid;
	gap: 6px;
}
.w2dc-bcal__iv {
	display: flex;
	align-items: center;
	gap: 6px;
}
.w2dc-bcal__iv .w2dc-bcal__in {
	flex: 1;
	width: auto;
}
.w2dc-bcal__iv.is-bad .w2dc-bcal__in {
	border-color: #d63638;
}
.w2dc-bcal__row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-top: 8px;
}
.w2dc-bcal__in {
	width: 100%;
	box-sizing: border-box;
}
.w2dc-bcal__row .w2dc-bcal__in {
	flex: 1;
	width: auto;
}
.w2dc-bcal__item {
	display: grid;
	gap: 1px;
	width: 100%;
	text-align: left;
	border: 0;
	border-left: 3px solid currentColor;
	border-radius: 3px;
	padding: 6px 8px;
	margin-bottom: 6px;
	cursor: pointer;
}
.w2dc-bcal__item span,
.w2dc-bcal__item em {
	color: #3c434a;
	font-size: 12px;
}
.w2dc-bcal__badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 8px;
}
.w2dc-bcal__dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 4px 10px;
	margin: 0;
}
.w2dc-bcal__dl dt {
	color: var(--bcal-muted);
}
.w2dc-bcal__dl dd {
	margin: 0;
	word-break: break-word;
}
.w2dc-bcal__form {
	display: grid;
	gap: 8px;
	margin-top: 8px;
}
.w2dc-bcal__field {
	display: grid;
	gap: 3px;
}
.w2dc-bcal__field.is-inline {
	display: block;
}
.w2dc-bcal__history {
	margin: 6px 0 0;
	font-size: 12px;
	color: #3c434a;
}

/* Resource picker with many resources: a search box with suggestions. */
.w2dc-bcal__rpick {
	position: relative;
	display: inline-block;
	min-width: 280px;
}
.w2dc-bcal__rinput {
	width: 100%;
	min-height: 32px;
}
.w2dc-bcal__rpick.is-busy::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-top: -8px;
	border: 2px solid rgba(128, 128, 128, 0.35);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: w2dc-bcal-spin 0.6s linear infinite;
}
@keyframes w2dc-bcal-spin {
	to { transform: rotate(360deg); }
}
.w2dc-bcal__rlist {
	position: absolute;
	z-index: 1000;
	left: 0;
	right: 0;
	top: 100%;
	margin: 2px 0 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	max-height: 320px;
	overflow-y: auto;
}
.w2dc-bcal__rlist li {
	margin: 0;
	padding: 6px 10px;
	cursor: pointer;
}
.w2dc-bcal__rlist li span {
	color: #646970;
}
.w2dc-bcal__rlist li.is-hi {
	background: #f0f6fc;
}
.w2dc-bcal__rlist li.is-current strong {
	color: var(--w2dc-primary, #2271b1);
}
.w2dc-bcal__rlist li.is-empty {
	color: #646970;
	cursor: default;
}

/* Rows the day editor hides (they are flex: [hidden] alone would not win). */
.w2dc-bcal [hidden] {
	display: none !important;
}
