/* Lommerrijk - custom interface tweaks.
   Loaded after librebooking.css. Bind-mounted from
   /volume1/docker/librebooking/custom/ so it survives image updates.
   Hard-reload (Cmd+Shift+R) after editing - the ?v= only changes on upgrade. */


/* Recolour Bootstrap's warning background (dashboard .timespan date headers).
   !important is required because Bootstrap's own utility uses it. */
.bg-warning {
    background-color: rgb(14 77 46 / 21%) !important;
}


/* Hide unused dashboard panels: Wachten op goedkeuring, Ontbrekende uitcheck.
   Keyed on the inner *Contents ids - five panels share the same outer id. */
#dashboardList > div:has(#PendingApprovalReservationsContents),
#dashboardList > div:has(#MissingCheckOutReservationsContents) {
    display: none;
}


/* Mededelingen: show only when it actually holds announcements. When empty the
   template renders a .noresults placeholder, which is what we key off here. */
#dashboardList > div:has(#announcementsContents .noresults) {
    display: none;
}


/* Hide the booking-rules column in the resource hover popup.
   Not .col-md-6 - the template uses col-md-5 when the resource has an image. */
#resourceDetailsPopup .settings {
    display: none;
}


/* Let the remaining popup columns absorb the space the hidden one left behind,
   instead of holding their fixed col-md-5/6 width and leaving a gap. */
#resourceDetailsPopup .attributes,
#resourceDetailsPopup .description {
    flex: 1 1 auto;
    max-width: 100%;
}


/* Hide the 'Reserveer' buttons in the Beschikbaarheid pane.
   !important is required to beat Bootstrap's .d-grid (display: grid !important). */
.reserveButton {
    display: none !important;
}



/* Schedule page: hide the printer (#print_schedule) and star / make-default
   (#make_default) icons. Wrapper is targeted so no margin gap is left;
   !important beats Bootstrap's .d-flex (display: flex !important). */
#schedule-actions div:has(> #print_schedule) {
    display: none !important;
}


/* Schedule page: hide the legend row (Reservable / Past / Restricted etc.).
   No !important needed - the d-* utilities sit on a child, not this wrapper. */
.schedule-legend {
    display: none;
}


/* Resource popup: hide the red required-field asterisk next to attribute labels.
   Scoped - the same control renders on real forms where it must stay visible. */
#resourceDetailsPopup .bi-asterisk {
    display: none;
}


/* Resource popup: append a euro sign to the 'Prijs per km.' value only.
   psiattribute2 = custom attribute id 2 - update this if the attribute is recreated. */
#resourceDetailsPopup .form-group:has(> label[for="psiattribute2"]) .attributeValue::before {
    content: "\20AC  ";
}


/* Beschikbaarheid pane: give the planning headers the same look as the green
   .timespan table headers - matching padding (p-1 = .25rem) and left alignment. */
#ResourceAvailabilityContents .text-body-secondary {
    background-color: rgb(14 77 46 / 21%);
    font-size: 1rem !important;
    font-weight: 500 !important;
    font-style: italic;
    text-align: left !important;
    padding: 0.25rem;
}


/* Beschikbaarheid pane: tone down the section headers and both no-data messages
   (the inline span has no fs-5, so it needs matching separately). */
#ResourceAvailabilityContents .fs-5,
#ResourceAvailabilityContents .no-data {
    font-size: 1rem !important;
}


/* Beschikbaarheid pane: drop the availability text shown next to each resource. */
#ResourceAvailabilityContents .availability {
    display: none;
}


/* Beschikbaarheid pane: flow the resource buttons next to each other and wrap onto
   new rows, instead of one full-width row each. Bootstrap's padding and border
   utilities are !important, so those need overriding explicitly. */
#ResourceAvailabilityContents .availabilityItem {
    display: inline-flex;
    width: auto;
    padding: 0 !important;
    margin: 1rem 1rem 0.5rem 0;
    border-bottom: 0 !important;
}

/* Stop the inner col-* forcing a percentage width / grid gutter on the button. */
#ResourceAvailabilityContents .availabilityItem > div {
    width: auto;
    padding: 0;
    margin-top: 0;
}


/* Dashboard: match the empty-state messages to the 1rem used elsewhere.
   !important beats .fs-5; scoped so the MyAccount table keeps its own size. */
#dashboardList .noresults {
    font-size: 1rem !important;
}


/* Base size app-wide - core sets body to 14px (librebooking.css:68). */
body {
    font-size: 1rem;
}

/* Bootstrap sizes these in rem, so they ignore the body size and stay at 0.875rem. */
.accordion-button,
.form-control-sm,
.form-select-sm {
    font-size: 1rem;
}

/* .btn-sm is driven by a Bootstrap variable rather than a font-size declaration. */
.btn-sm,
.btn-group-sm > .btn {
    --bs-btn-font-size: 1rem;
}

/* Core sets dropdown menus to 12px (librebooking.css:96). */
.dropdown-menu {
    font-size: 0.875rem;
}


/* Reservation hover tooltip: match the 1rem used elsewhere (core sets 14px). */
.respopup-tooltip .tooltip-inner {
    font-size: 1rem;
}


/* Mededelingen: strip the accordion chrome so it reads as one plain, subtle line. */
#announcementsDashboard .accordion-header {
    display: none;
}

/* Header is gone, so keep the body open - an id beats .collapse:not(.show). */
#announcementsContents {
    display: block;
}

/* Keep the 1.25rem left inset so the text lines up with the other pane headers. */
#announcementsContents .accordion-body {
    padding: 0.5rem 1.25rem;
}

/* Drop the per-item divider and its vertical padding - both Bootstrap !important. */
#announcementsContents .announcementContent > div {
    border-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#announcementsContents a {
    text-decoration: none;
}

/* Reboot gives p a 1rem bottom margin, which throws off the vertical centring. */
#announcementsContents p {
    margin-bottom: 0;
}
