/**
 * Booking fields on a unit page. Colors come from the theme's custom
 * properties, with fallbacks so the plugin still looks right on any theme.
 */

.bb-booking {
	--bb-ink: var( --bounce-ink, #1d2330 );
	--bb-muted: var( --bounce-muted, #5d6675 );
	--bb-line: var( --bounce-line, #e3e7ee );
	--bb-accent: var( --bounce-primary, #f4543c );
	--bb-accent-ink: var( --bounce-primary-ink, #fff );
	--bb-surface: var( --bounce-surface, #fff );

	margin: 0 0 24px;
}

.bb-field {
	margin: 0 0 20px;
}

.bb-label {
	display: block;
	font-weight: 700;
	font-size: 0.95rem;
	color: var( --bb-ink );
	margin: 0 0 8px;
}

.bb-optional {
	font-weight: 400;
	color: var( --bb-muted );
	font-size: 0.85em;
}

.bb-hint {
	margin: 8px 0 0;
	font-size: 0.85rem;
	color: var( --bb-muted );
}

.bb-hint.is-warning {
	color: #a8390f;
	font-weight: 600;
}

.bb-select,
.bb-textarea {
	width: 100%;
	max-width: 420px;
	padding: 11px 12px;
	border: 2px solid var( --bb-line );
	border-radius: 10px;
	background: var( --bb-surface );
	color: var( --bb-ink );
	font: inherit;
	font-size: 0.95rem;
}

.bb-select:focus-visible,
.bb-textarea:focus-visible {
	outline: 3px solid var( --bb-accent );
	outline-offset: 1px;
}

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

.bb-calendar {
	max-width: 340px;
	padding: 14px;
	border: 2px solid var( --bb-line );
	border-radius: 14px;
	background: var( --bb-surface );
}

.bb-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 10px;
}

.bb-cal-title {
	font-weight: 700;
	font-size: 1rem;
	color: var( --bb-ink );
}

.bb-cal-nav {
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	border: 2px solid var( --bb-line );
	border-radius: 9px;
	background: transparent;
	color: var( --bb-ink );
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.bb-cal-nav:hover:not( [disabled] ) {
	border-color: var( --bb-accent );
	color: var( --bb-accent );
}

.bb-cal-nav[disabled] {
	opacity: 0.35;
	cursor: default;
}

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

.bb-cal-weekdays {
	margin: 0 0 4px;
}

.bb-cal-weekdays span {
	text-align: center;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var( --bb-muted );
	padding: 4px 0;
}

.bb-cal-day {
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 9px;
	background: #f2f4f8;
	color: var( --bb-ink );
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	transition: transform 0.08s ease, background-color 0.12s ease;
}

.bb-cal-day:hover:not( .is-disabled ) {
	background: #ffe3dd;
	transform: translateY( -1px );
}

.bb-cal-day:focus-visible {
	outline: 3px solid var( --bb-accent );
	outline-offset: 2px;
}

.bb-cal-day.is-disabled {
	background: transparent;
	color: #b6bcc8;
	cursor: not-allowed;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.bb-cal-day.is-selected {
	background: var( --bb-accent );
	color: var( --bb-accent-ink );
}

.bb-cal-blank {
	aspect-ratio: 1;
}

.bb-cal-key {
	display: flex;
	gap: 14px;
	margin: 12px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid var( --bb-line );
	font-size: 0.78rem;
	color: var( --bb-muted );
}

.bb-key-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.bb-key-dot {
	width: 11px;
	height: 11px;
	border-radius: 3px;
	display: inline-block;
}

.bb-key-dot.is-open {
	background: #f2f4f8;
	border: 1px solid var( --bb-line );
}

.bb-key-dot.is-taken {
	background: transparent;
	border: 1px solid #c9cfda;
	position: relative;
}

.bb-key-dot.is-taken::after {
	content: "";
	position: absolute;
	inset: 50% 1px auto;
	border-top: 1px solid #99a1b0;
}

.bb-selected-date {
	margin: 10px 0 0;
	font-size: 0.9rem;
	color: var( --bb-muted );
}

.bb-selected-date.is-set {
	color: var( --bb-ink );
	font-weight: 700;
}

/* --- Setup mode ------------------------------------------------------- */

.bb-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.bb-mode {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 14px;
	border: 2px solid var( --bb-line );
	border-radius: 11px;
	cursor: pointer;
	font-size: 0.92rem;
	font-weight: 600;
	color: var( --bb-ink );
	background: var( --bb-surface );
}

.bb-mode:has( input:checked ) {
	border-color: var( --bb-accent );
	background: #fff5f2;
}

.bb-mode:has( input:focus-visible ) {
	outline: 3px solid var( --bb-accent );
	outline-offset: 2px;
}

.bb-mode input {
	margin: 0;
	accent-color: var( --bb-accent );
}

.bb-mode-note {
	color: var( --bb-muted );
	font-weight: 700;
	font-size: 0.85em;
}

/* --- Deposit note and specs ------------------------------------------ */

.bb-deposit-note {
	margin: 0 0 18px;
	padding: 11px 14px;
	border-radius: 11px;
	background: #f2fbf4;
	border: 1px solid #c9ead2;
	color: #1f5c31;
	font-size: 0.92rem;
}

.bb-deposit-note .amount,
.bb-deposit-note strong {
	color: #14532d;
}

.bb-bundle-note {
	margin: 0 0 18px;
	padding: 11px 14px;
	border-radius: 11px;
	background: #fff8e8;
	border: 1px solid #f2dfae;
	color: #6b4d05;
	font-size: 0.92rem;
}

.bb-specs {
	margin: 28px 0 0;
	padding: 20px 22px;
	border-radius: 14px;
	background: #f7f8fb;
}

.bb-specs-title {
	margin: 0 0 12px;
	font-size: 1.05rem;
}

.bb-specs-list {
	margin: 0;
	display: grid;
	gap: 10px;
}

.bb-spec {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	justify-content: space-between;
	padding: 0 0 10px;
	border-bottom: 1px solid #e6e9f0;
}

.bb-spec:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.bb-spec dt {
	margin: 0;
	font-weight: 700;
	font-size: 0.88rem;
	color: #5d6675;
}

.bb-spec dd {
	margin: 0;
	font-size: 0.92rem;
	text-align: right;
}

.bb-out-of-area {
	margin: 0;
	color: #a8390f;
}

@media ( max-width: 480px ) {
	.bb-calendar {
		max-width: none;
	}

	.bb-spec dd {
		text-align: left;
	}
}
