/* Club customisations for LibreBooking (loaded via LB_CSS_EXTENSION_FILE) */

:root {
	--club-dark: #333;
	--club-button: #555;
	/* Darker, accessible interaction variant of the website's #e84747. */
	--club-red-interactive: #c93636;
}

/* Replace LibreBooking's teal UI accent without touching its reservation and status colors. */
[data-bs-theme] {
	--primary: var(--club-button);
	--primary-hover: var(--club-red-interactive);
	--primary-disabled: color-mix(in oklab, var(--club-button) 40%, white);
}

/* Match the club website's dark navigation. Dropdowns stay light for readability. */
nav.navbar {
	background-color: var(--club-dark) !important;
}
nav.navbar .nav-link,
nav.navbar .nav-link.link-primary {
	color: #fff !important;
}
nav.navbar .nav-link:hover,
nav.navbar .nav-link:focus,
nav.navbar .nav-item.show > .nav-link {
	background-color: var(--club-red-interactive);
	color: #fff !important;
}
nav.navbar .dropdown-item:hover,
nav.navbar .dropdown-item:focus {
	background-color: var(--club-red-interactive);
	color: #fff;
}
nav.navbar .navbar-toggler {
	border-color: #777;
}
nav.navbar .navbar-toggler-icon {
	filter: invert(1);
}

/* Club buttons are neutral by default and use red only for interaction. Semantic success/warning/danger buttons
   retain LibreBooking's own colors. */
.btn-primary {
	--bs-btn-bg: var(--club-button);
	--bs-btn-border-color: var(--club-button);
	--bs-btn-hover-bg: var(--club-red-interactive);
	--bs-btn-hover-border-color: var(--club-red-interactive);
	--bs-btn-active-bg: var(--club-red-interactive);
	--bs-btn-active-border-color: var(--club-red-interactive);
	--bs-btn-focus-shadow-rgb: 201, 54, 54;
}
.btn-outline-primary {
	--bs-btn-color: var(--club-button);
	--bs-btn-border-color: var(--club-button);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--club-red-interactive);
	--bs-btn-hover-border-color: var(--club-red-interactive);
	--bs-btn-active-bg: var(--club-red-interactive);
	--bs-btn-active-border-color: var(--club-red-interactive);
	--bs-btn-focus-shadow-rgb: 201, 54, 54;
}

/* Floor plan above the schedule, so everyone sees where each table stands.
   Phones get schedule-mobile.tpl without the legend; there it goes above the filter link. */
#page-schedule .schedule-legend::before,
#page-schedule:not(:has(.schedule-legend)) > div:has(> a.toggle-sidebar)::before {
	content: "";
	display: block;
	width: 100%;
	max-height: 340px;
	aspect-ratio: 1132 / 862;
	margin: 0 auto 1rem;
	background: url("../uploads/images/tischplan.png") center / contain no-repeat;
}

/* Legend entries for features the club does not use */
.schedule-legend .legend.participating,
.schedule-legend .legend.pending {
	display: none !important;
}

/* The header uses the club's wide wordmark while login and favicon keep the compact emblem. LibreBooking exposes
   only one logo URL, so replace just the header image through its dedicated .logo class. */
img.logo {
	content: url("../img/header-logo.png");
	width: min(335px, 60vw);
	height: auto;
	max-height: 50px;
}

/* The white image backgrounds blend into the page. On the login page LibreBooking stretches the emblem to half
   the card width, so it gets a fixed size there. */
img.logo,
.login-icon img {
	mix-blend-mode: multiply;
}
.login-icon img {
	width: 160px !important;
	max-width: 50%;
}

/* "Turn off calendar subscription" is hidden with d-none in LibreBooking's mycalendar.subscription.tpl,
   although it works; show it next to "Subscribe to calendar" */
#calendarSubscription #turnOffSubscription.d-none {
	display: inline-block !important;
	margin-right: 1rem;
}
