/**
 * Booking form styling.
 *
 * Deliberately unopinionated about colour: the theme owns the palette, this file
 * only owns layout and the availability states the calendar has to make obvious.
 */

.costa-booking {
	--costa-gap: 12px;
	--costa-muted: #f1f1f1;
	--costa-closed: #e3e3e3;
	--costa-soldout: #f6dede;
	--costa-accent: currentColor;
	max-width: 520px;
}

.costa-booking__field {
	margin-bottom: var(--costa-gap);
}

.costa-booking__field label,
.costa-booking__label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.costa-booking__field select,
.costa-booking__field input[type="number"],
.costa-booking__field input[type="text"],
.costa-booking__field input[type="email"],
.costa-booking__field input[type="tel"],
.costa-booking__field input[type="time"],
.costa-booking__field textarea {
	width: 100%;
	box-sizing: border-box;
}

.costa-booking__field--consent label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-weight: 400;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.costa-booking__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.costa-calendar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.costa-calendar__title {
	font-weight: 600;
	text-transform: capitalize;
}

.costa-calendar__nav {
	border: 1px solid var(--costa-closed);
	background: none;
	cursor: pointer;
	padding: 2px 10px;
	line-height: 1.6;
}

.costa-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.costa-calendar__grid[aria-busy="true"] {
	opacity: 0.5;
}

.costa-day-name {
	text-align: center;
	font-size: 0.75em;
	text-transform: uppercase;
	opacity: 0.6;
	padding-bottom: 4px;
}

.costa-day {
	aspect-ratio: 1;
	border: 1px solid var(--costa-closed);
	background: none;
	cursor: pointer;
	font: inherit;
	padding: 0;
}

.costa-day:hover:not(:disabled) {
	border-color: var(--costa-accent);
}

.costa-day.is-selected {
	outline: 2px solid var(--costa-accent);
	font-weight: 700;
}

.costa-day--blank {
	border: 0;
	cursor: default;
}

.costa-day:disabled {
	cursor: not-allowed;
}

/* Unbookable days: flat grey, same text colour as bookable days (theme paints those white on a gradient). */
.costa-booking .costa-day:disabled,
.costa-booking .costa-day--closed,
.costa-booking .costa-day--too-soon,
.costa-booking .costa-day--no-term {
	background: #b5b5b5 !important;
	color: #fff !important;
	opacity: 1;
}

.costa-day--closed,
.costa-day--too-soon,
.costa-day--no-term {
	background: var(--costa-closed);
}

.costa-day--sold-out {
	background: var(--costa-soldout);
	/* Sold out and closed must not look alike — one may free up, the other never will. */
	text-decoration: line-through;
}

/* Compact calendar. Selectors are prefixed so theme button styles cannot re-inflate it. */
.costa-booking .costa-calendar {
	max-width: 320px;
}

.costa-booking .costa-calendar__grid {
	gap: 3px;
}

.costa-booking .costa-calendar__title {
	font-size: 1em;
}

.costa-booking .costa-calendar__nav {
	width: 32px;
	height: 32px;
	min-height: 0;
	padding: 0;
	font-size: 1em;
	line-height: 1;
}

.costa-booking .costa-day-name {
	font-size: 0.7em;
}

.costa-booking .costa-day {
	aspect-ratio: auto;
	height: 36px;
	min-height: 0;
	padding: 0;
	font-size: 0.85em;
	line-height: 1;
	border-radius: 4px;
}

.costa-calendar__legend {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8em;
	margin-top: 8px;
	opacity: 0.8;
}

.costa-legend {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 1px solid var(--costa-closed);
}

.costa-legend--closed { background: var(--costa-closed); }
.costa-legend--soldout { background: var(--costa-soldout); }

.costa-booking__summary {
	background: var(--costa-muted);
	padding: 12px;
	margin: var(--costa-gap) 0;
}

.costa-summary__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 2px 0;
}

.costa-booking__notice,
.costa-booking__cancel-policy,
.costa-booking__hint {
	font-size: 0.85em;
	opacity: 0.85;
}

.costa-booking__notice {
	border-left: 3px solid var(--costa-closed);
	padding-left: 10px;
}

.costa-booking__message.is-error {
	color: #b32d2e;
	font-weight: 600;
}

.costa-booking__submit[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---- Light-on-blue skin: white rounded fields, white labels (form sits on a blue block). ---- */
.costa-booking {
	max-width: none;
	color: #fff;
}

.costa-booking__field label,
.costa-booking__label {
	color: #fff;
	font-weight: 700;
	font-size: 1.1em;
}

.costa-booking .costa-booking__field select,
.costa-booking .costa-booking__field input[type="number"],
.costa-booking .costa-booking__field input[type="text"],
.costa-booking .costa-booking__field input[type="email"],
.costa-booking .costa-booking__field input[type="tel"],
.costa-booking .costa-booking__field input[type="time"],
.costa-booking .costa-booking__field textarea {
	background-color: #fff;
	border-color: var(--e-global-color-616d24d);
	border-style: solid;
	border-width: 0;
	border-radius: 8px;
	color: #444;
	height: 48px;
	padding: 0 16px;
	font: inherit;
	font-size: 1em;
	box-shadow: none;
}

.costa-booking .costa-booking__field textarea {
	height: auto;
	padding: 12px 16px;
}

.costa-booking .costa-booking__field--consent label {
	font-size: 0.9em;
	font-weight: 400;
}

.costa-booking .costa-calendar {
	background: #fff;
	border-radius: 10px;
	padding: 12px;
	box-sizing: border-box;
}

.costa-booking .costa-calendar__title,
.costa-booking .costa-day-name,
.costa-booking .costa-calendar__legend {
	color: #000;
	opacity: 1;
}

.costa-booking .costa-calendar__nav {
	border: 0;
	border-radius: 8px;
	background: #2a78b5 !important;
	color: #fff !important;
	font-weight: 700;
}

/* Fully booked: clearly red, distinct from the grey closed days. */
.costa-booking .costa-day--sold-out {
	background: #e5202e !important;
	color: #fff !important;
	opacity: 1;
}

.costa-booking .costa-legend--soldout {
	background: #e5202e;
}

.costa-booking .costa-legend--closed {
	background: #b5b5b5;
}

.costa-booking .costa-day {
	border-radius: 10px;
}

.costa-booking .costa-day--blank {
	background: none !important;
}

/* Selected day: white outline is invisible on the white calendar panel, so use a dark fill + ring. */
.costa-booking .costa-day.is-selected {
	background: #0d2f52 !important;
	color: #fff !important;
	outline: 3px solid #2a78b5;
	outline-offset: 1px;
	font-weight: 800;
	box-shadow: 0 2px 8px rgba(13, 47, 82, 0.45);
}

.costa-booking .costa-legend {
	border: 0;
	border-radius: 3px;
}

.costa-booking__summary {
	background: rgba(255, 255, 255, 0.18);
	border-radius: 10px;
	color: #fff;
}

.costa-booking__notice {
	border-left-color: #fff;
}

.costa-booking__message.is-error {
	color: #fff;
	background: #b32d2e;
	padding: 8px 12px;
	border-radius: 10px;
}

.costa-booking .costa-booking__submit {
	display: block;
	width: 100%;
	height: 52px;
	background: #fff;
	color: #000;
	border: 0;
	border-radius: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	cursor: pointer;
}

/* ---- Status page ([costa_reserva_stav]): stands alone on a plain page, so it
   brings the blue block with it instead of expecting the theme to provide one. ---- */
.costa-booking--status {
	max-width: 640px;
	margin: 0 auto 2em;
	padding: 24px;
	background: var(--e-global-color-711eca9, #00c9ea);
	border-radius: 16px;
}

.costa-booking--status p {
	color: #fff;
}

.costa-booking--status .costa-booking__cancel {
	margin-top: var(--costa-gap);
}
