/**
 * Hunt Vizion Delivery Rules - calendar tooltip styling
 *
 * Colors follow the Hunt Vizion red accent. Adjust --hvdr-accent if the brand
 * palette changes; everything else derives from it.
 */

:root {
	--hvdr-accent: #b31b1b;
	--hvdr-tooltip-bg: #1f1f1f;
	--hvdr-tooltip-fg: #ffffff;
}

/* ── Blocked day cell ───────────────────────────────────────── */

.litepicker .day-item.hvdr-blocked-day,
.day-item.hvdr-blocked-day {
	position: relative;
	cursor: not-allowed;
	color: #a3a3a3;
	text-decoration: line-through;
	text-decoration-color: var( --hvdr-accent );
	text-decoration-thickness: 2px;
	opacity: 1; /* Override Litepicker's is-locked fade so the strike reads. */
}

.litepicker .day-item.hvdr-blocked-day:hover,
.day-item.hvdr-blocked-day:hover {
	background-color: transparent;
	color: #a3a3a3;
}

/* ── Tooltip ────────────────────────────────────────────────── */

.hvdr-tooltip {
	position: absolute;
	bottom: calc( 100% + 8px );
	left: 50%;
	transform: translateX( -50% );
	z-index: 100;

	width: max-content;
	max-width: 220px;
	padding: 8px 10px;

	background-color: var( --hvdr-tooltip-bg );
	color: var( --hvdr-tooltip-fg );
	border-radius: 4px;
	border-top: 2px solid var( --hvdr-accent );

	font-size: 12px;
	line-height: 1.4;
	font-weight: 400;
	text-align: left;
	text-decoration: none;
	white-space: normal;

	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 120ms ease-in-out, visibility 120ms ease-in-out;
}

/* Arrow */
.hvdr-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX( -50% );
	border: 5px solid transparent;
	border-top-color: var( --hvdr-tooltip-bg );
}

.hvdr-blocked-day:hover .hvdr-tooltip,
.hvdr-blocked-day:focus .hvdr-tooltip,
.hvdr-blocked-day:focus-within .hvdr-tooltip,
.hvdr-blocked-day.hvdr-tooltip-visible .hvdr-tooltip {
	opacity: 1;
	visibility: visible;
}

/* Keep the tooltip inside the calendar on the first and last columns. */
.litepicker .container__days > .hvdr-blocked-day:nth-child( 7n + 1 ) .hvdr-tooltip {
	left: 0;
	transform: none;
}

.litepicker .container__days > .hvdr-blocked-day:nth-child( 7n + 1 ) .hvdr-tooltip::after {
	left: 16px;
}

.litepicker .container__days > .hvdr-blocked-day:nth-child( 7n ) .hvdr-tooltip {
	left: auto;
	right: 0;
	transform: none;
}

.litepicker .container__days > .hvdr-blocked-day:nth-child( 7n ) .hvdr-tooltip::after {
	left: auto;
	right: 16px;
}

/* ── Pro Tip notice ─────────────────────────────────────────── */

.hvdr-pro-tip {
	margin: 0 0 12px;
	padding: 10px 12px;
	background-color: #fdf3f3;
	border-left: 3px solid var( --hvdr-accent );
	font-size: 14px;
	line-height: 1.45;
}

.hvdr-pro-tip strong {
	color: var( --hvdr-accent );
}

/* ── Small screens ──────────────────────────────────────────── */

@media ( max-width: 480px ) {
	.hvdr-tooltip {
		max-width: 160px;
		font-size: 11px;
		padding: 6px 8px;
	}
}
