/**
 * Trade-in booking notice (1.3.0).
 *
 * The same box the Woo checkout shows when checkout-lock-hours closes the pickup window
 * (mister-mobile plugin, modules/checkout-lock-hours/assets/css/checkout.css), which is
 * itself a 1:1 mirror of the "Good to know" box. Reproduced here under the trade-in
 * plugin's own prefix so neither plugin's stylesheet depends on the other being loaded.
 *
 *   .mm-clh-notice              -> .mm-tib-notice
 *   .mm-clh-notice__iconwrap    -> .mm-tib-notice__iconwrap
 *   .mm-clh-notice__body        -> .mm-tib-notice__body
 *   .mm-clh-notice__title       -> .mm-tib-notice__title
 *   .mm-clh-notice__text        -> .mm-tib-notice__text
 *   .mm-clh-field--dead         -> .mm-tib-field--dead
 *   .mm-clh-day-blocked         -> .mm-tib-day-blocked
 *
 * Replaces the old #lock_hours_notice inline-styled yellow bar ("I Can't handle this
 * Trade In Right Now…") and the .blur treatment of the booking wrappers.
 */

#lock_hours_notice.mm-tib-notice,
.mm-tib-notice {
	/* Own full-width row inside the flex .appointment row. */
	clear: both;
	float: none;
	width: 100%;
	box-sizing: border-box;

	display: none; /* .is-visible switches to flex — never jQuery .show() */
	align-items: center;
	gap: 12px;

	margin: 10px 0 4px;
	padding: 14px 16px;

	background: #fffbe6;
	border: 1px solid #ffe28a;
	border-radius: 8px;

	font-family: Montserrat, sans-serif;
}

.mm-tib-notice.is-visible {
	display: flex;
}

.mm-tib-notice__iconwrap {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	margin-top: 1px;
	line-height: 0;
}

.mm-tib-notice__icon {
	display: block;
	width: 24px;
	height: 24px;
}

.mm-tib-notice__body {
	flex: 1 1 auto;
	min-width: 0;
}

.mm-tib-notice__title {
	font-size: 14px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 6px;
}

.mm-tib-notice__text {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	color: #4a4a4a;
	margin: 0;
}

/* Narrow screens swap the long sentence for the short one. */
.mm-tib-notice__text--narrow {
	display: none;
}

@media ( max-width: 767px ) {
	.mm-tib-notice__text--wide {
		display: none;
	}

	.mm-tib-notice__text--narrow {
		display: inline;
	}
}

/* Greyed-out date / time / branch inputs while the notice is up. */
.mm-tib-field--dead,
select.mm-tib-field--dead {
	background: #f5f5f5 !important;
	border-color: #d6d9dd !important;
	color: #a9aeb4 !important;
	cursor: not-allowed;
}

.mm-tib-field--dead::placeholder {
	color: #a9aeb4;
	opacity: 1;
}

/* Generic class-based hide (checkout-cart-constraints.js hides the Doorstep label with it). */
.mm-tib-hidden {
	display: none !important;
}

/*
 * Days the lock window / date rules ruled out. jQuery UI already makes them
 * unclickable (.ui-state-disabled); this only makes them read as disabled —
 * grey, no strike-through (same rule as the Woo checkout since 2026-09-07).
 */
.ui-datepicker td.mm-tib-day-blocked span,
.ui-datepicker td.mm-tib-day-blocked a {
	opacity: 0.35;
	color: #a9aeb4;
	background: transparent;
	cursor: not-allowed;
	pointer-events: none;
}
