/* ==========================================================================
   Cat Café Bookings – front-end restyle
   Matches ArtéKatz / Cat Café branding: charcoal + red, warm cream accents.
   catcafe-bookings-off v1.5.0
   ========================================================================== */

.catcafe-booking-form {
	--cc-red: #d7262c;
	--cc-red-dark: #b01d22;
	--cc-red-soft: #fdecec;
	--cc-ink: #2b2b2b;
	--cc-muted: #7a7470;
	--cc-line: #e6e0da;
	--cc-cream: #faf6f1;
	--cc-white: #ffffff;
	--cc-green: #3f8f5a;
	--cc-green-soft: #edf6f0;
	--cc-radius: 14px;

	box-sizing: border-box;
	max-width: 560px;
	margin: 32px auto 48px;
	padding: 32px 32px 28px;
	background: var(--cc-white);
	border: 1px solid var(--cc-line);
	border-top: 5px solid var(--cc-red);
	border-radius: 18px;
	box-shadow: 0 18px 40px -18px rgba(43, 43, 43, .28);
	color: var(--cc-ink);
	font-size: 15px;
	line-height: 1.5;
	/* Safe even if the shortcode ends up inside pre/code formatting. */
	white-space: normal;
	text-align: left;
}

pre:has(> code > .catcafe-booking-form),
pre:has(> .catcafe-booking-form),
code:has(> .catcafe-booking-form) {
	all: unset;
	display: block;
	font-family: inherit;
}

.catcafe-booking-form *,
.catcafe-booking-form *::before,
.catcafe-booking-form *::after {
	box-sizing: border-box;
}

/* Heading above the form (CSS only, so no template change needed) */
.catcafe-booking-form::before {
	content: "Book your high tea";
	display: block;
	margin: 0 0 22px;
	font-family: "Shadows Into Light", cursive;
	font-size: 34px;
	line-height: 1.1;
	color: var(--cc-ink);
	text-align: center;
}

/* ---------- Fields ---------- */

.catcafe-field {
	margin: 0 0 22px;
}

.catcafe-field label {
	display: block;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cc-ink);
}

.catcafe-booking-form .catcafe-field input[type="text"],
.catcafe-booking-form .catcafe-field input[type="number"],
.catcafe-booking-form .catcafe-field select,
.catcafe-booking-form .catcafe-field textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 14px;
	background: var(--cc-cream);
	border: 1px solid var(--cc-line);
	border-radius: 10px;
	color: var(--cc-ink);
	font: inherit;
	font-size: 15px;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.catcafe-booking-form .catcafe-field textarea {
	min-height: 72px;
	resize: none;
}

.catcafe-booking-form .catcafe-field select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 42px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232b2b2b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.catcafe-booking-form .catcafe-field select:disabled {
	color: var(--cc-muted);
	cursor: not-allowed;
	opacity: .75;
}

.catcafe-booking-form .catcafe-field input::placeholder,
.catcafe-booking-form .catcafe-field textarea::placeholder {
	color: #a9a29c;
}

.catcafe-booking-form .catcafe-field input:focus,
.catcafe-booking-form .catcafe-field select:focus,
.catcafe-booking-form .catcafe-field textarea:focus {
	outline: none;
	background-color: var(--cc-white);
	border-color: var(--cc-red);
	box-shadow: 0 0 0 3px rgba(215, 38, 44, .15);
}

/* Guest-count boxes (oat milk, gluten-free, add-ons) don't need full width */
.catcafe-booking-form .catcafe-field input[type="number"] {
	width: 120px;
}

.catcafe-fee-note {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--cc-muted);
}

/* Session time pill */
.catcafe-session-note {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	padding: 6px 14px;
	background: var(--cc-cream);
	border: 1px solid var(--cc-line);
	border-radius: 999px;
	font-size: 14px;
	color: var(--cc-ink);
}

.catcafe-session-note::before {
	content: "☕";
	font-size: 15px;
	line-height: 1;
}

/* ---------- Calendar ---------- */

.catcafe-calendar {
	padding: 16px;
	background: var(--cc-cream);
	border: 1px solid var(--cc-line);
	border-radius: var(--cc-radius);
	transition: opacity .2s;
}

.catcafe-calendar.catcafe-loading,
.catcafe-loading .catcafe-calendar {
	opacity: .5;
	pointer-events: none;
}

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

.catcafe-cal-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--cc-ink);
}

.catcafe-booking-form .catcafe-cal-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: var(--cc-white);
	border: 1px solid var(--cc-line);
	border-radius: 50%;
	color: var(--cc-ink);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}

.catcafe-booking-form .catcafe-cal-nav:hover:not(:disabled) {
	background: var(--cc-red);
	border-color: var(--cc-red);
	color: var(--cc-white);
}

.catcafe-booking-form .catcafe-cal-nav:disabled {
	opacity: .35;
	cursor: default;
}

.catcafe-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
}

.catcafe-cal-weekday {
	padding: 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-align: center;
	color: var(--cc-muted);
}

.catcafe-booking-form .catcafe-cal-day {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	aspect-ratio: 1 / 1;
	min-height: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 10px;
	color: #c4bdb6;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	cursor: default;
	transition: transform .12s, background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}

.catcafe-cal-empty {
	aspect-ratio: 1 / 1;
	background: transparent;
	border: 0;
}

/* Seats left */
.catcafe-cal-day small {
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	color: var(--cc-green);
	white-space: nowrap;
}

.catcafe-cal-day small::after {
	content: " left";
}

/* Open dates */
.catcafe-booking-form .catcafe-cal-day.is-bookable {
	background: var(--cc-white);
	border-color: var(--cc-line);
	color: var(--cc-ink);
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(43, 43, 43, .06);
}

.catcafe-booking-form .catcafe-cal-day.is-bookable:hover {
	border-color: var(--cc-red);
	transform: translateY(-1px);
	box-shadow: 0 6px 14px -8px rgba(215, 38, 44, .6);
}

.catcafe-booking-form .catcafe-cal-day.is-bookable:focus-visible {
	outline: none;
	border-color: var(--cc-red);
	box-shadow: 0 0 0 3px rgba(215, 38, 44, .2);
}

/* Chosen date */
.catcafe-booking-form .catcafe-cal-day.is-selected,
.catcafe-booking-form .catcafe-cal-day.is-selected:hover {
	background: var(--cc-red);
	border-color: var(--cc-red);
	color: var(--cc-white);
	transform: none;
	box-shadow: 0 8px 18px -8px rgba(215, 38, 44, .8);
}

.catcafe-cal-day.is-selected small {
	color: rgba(255, 255, 255, .9);
}

/* Fully booked / online bookings closed */
.catcafe-booking-form .catcafe-cal-day.is-full {
	background: transparent;
	border: 1px dashed #e3c9c9;
	color: #c99a9a;
	cursor: not-allowed;
}

.catcafe-booking-form .catcafe-cal-day.is-full::after {
	content: "";
	position: absolute;
	left: 28%;
	right: 28%;
	top: 50%;
	height: 1px;
	background: currentColor;
	transform: rotate(-20deg);
}

/* Days the café is closed */
.catcafe-booking-form .catcafe-cal-day.is-closed {
	background: transparent;
	border-color: transparent;
	color: #cdc6bf;
	font-weight: 400;
}

/* ---------- Summary + submit ---------- */

.catcafe-selected-date {
	margin: 12px 0 0;
	padding: 10px 14px;
	background: var(--cc-red-soft);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cc-red-dark);
}

.catcafe-selected-date[hidden] {
	display: none;
}

.catcafe-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 6px 0 18px;
	padding: 16px 0 0;
	border-top: 1px solid var(--cc-line);
	font-size: 15px;
	color: var(--cc-muted);
}

.catcafe-total[hidden] {
	display: none;
}

.catcafe-total-amount {
	font-size: 24px;
	font-weight: 700;
	color: var(--cc-ink);
}

.catcafe-submit,
.catcafe-booking-form .single_add_to_cart_button,
.woocommerce .catcafe-booking-form button.button.alt.catcafe-submit {
	display: block;
	width: 100%;
	min-height: 54px;
	margin: 6px 0 0;
	padding: 14px 24px;
	background: var(--cc-red);
	border: 0;
	border-radius: 999px;
	color: var(--cc-white);
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 10px 22px -12px rgba(215, 38, 44, .9);
	transition: background-color .15s, transform .12s, box-shadow .15s;
}

.catcafe-submit:hover:not(:disabled),
.woocommerce .catcafe-booking-form button.button.alt.catcafe-submit:hover:not(:disabled) {
	background: var(--cc-red-dark);
	color: var(--cc-white);
	transform: translateY(-1px);
}

.catcafe-submit:disabled,
.woocommerce .catcafe-booking-form button.button.alt.catcafe-submit:disabled,
.woocommerce .catcafe-booking-form button.button.alt.catcafe-submit:disabled[disabled] {
	background: #e4dfda;
	color: #9b948e;
	box-shadow: none;
	cursor: not-allowed;
	opacity: 1;
	transform: none;
}

/* ---------- Small screens ---------- */

@media (max-width: 520px) {
	.catcafe-booking-form {
		margin: 16px auto 32px;
		padding: 24px 16px 20px;
		border-radius: 14px;
	}
	.catcafe-booking-form::before {
		font-size: 28px;
	}
	.catcafe-calendar {
		padding: 10px;
	}
	.catcafe-cal-grid {
		gap: 4px;
	}
	.catcafe-booking-form .catcafe-cal-day {
		font-size: 14px;
		border-radius: 8px;
	}
	.catcafe-cal-day small::after {
		content: "";
	}
}
