/*
 * Pre-existing GLPI core layout quirk (not specific to this plugin): the
 * "saved searches" panel row (.row > .card.saved-searches-panel) on the
 * ticket page bleeds ~8px past its container's right edge, because a
 * Bootstrap .row's negative side margins aren't offset by matching padding
 * at this exact nesting level. That 8px is enough to trigger a full-page
 * horizontal (and, depending on scrollbar overlay behavior, vertical)
 * scrollbar even though the visible content otherwise fits the viewport.
 * Reported by the user via browser inspector on #page.legacy /
 * .page-body.container-fluid - contained here rather than patched in core,
 * since it's a pure clipping fix with no visual side effects (the bleeding
 * 8px was never meant to be visible in the first place).
 */
#page.legacy,
.page-body.container-fluid {
    overflow-x: hidden;
}

/*
 * Real remaining cause, found and confirmed by the user via DevTools:
 * .page-wrapper.mb-0 sits ~15px lower than it needs to (an extra top gap
 * above the header), pushing the whole page exactly that many px past the
 * viewport bottom. Pulling it back up removes the scrollbar without
 * affecting anything below the fold.
 */
.page-wrapper.mb-0 {
    margin-top: -15px;
}

/*
 * "Graue, fast transparente, abgerundete Kästchen die schweben" bei jeder
 * Ticket-Antwort: GLPI's own core timeline styling gives every PRIVATE
 * followup/task/etc. a dashed border instead of a solid one (see
 * .timeline-item.private-item .timeline-content in GLPI's
 * css/includes/components/itilobject/_timeline.scss) - a deliberate
 * "internal note" visual cue. Every note type this instance uses except
 * "Kundenstatus" is is_private=1 (Bearbeitungsvermerk, Vorprüfung, Status
 * intern, Information, Eskalation, ...), so in practice almost every single
 * timeline entry ends up with this dashed, slightly-transparent-looking
 * border - reported by the user as an unwanted floating box, not a
 * deliberate "this is private" signal they want to keep seeing constantly.
 * Reverts private items back to the same solid border normal (non-private)
 * items already use.
 */
.timeline-item.private-item .timeline-content {
    border-style: solid;
    border-width: 1px;
    padding: 2px;
}

/*
 * THE actual thing the user meant all along ("graue kommentar feld dings,
 * kommentar symbol, ganz leicht sichtbar, liegt über der Antwort"): GLPI
 * gives every timeline entry type its own faint watermark icon painted
 * behind the content - a "followup.png" speech-bubble/comment icon for
 * ITILFollowup entries, "task.png" for ITILTask, and a faint `.solimg`
 * icon glyph for ITILSolution (see _timeline.scss). Removed for all three
 * - purely decorative, no functional loss.
 */
.timeline-item.ITILFollowup .timeline-content,
.timeline-item.ITILTask .timeline-content,
.timeline-item.KnowbaseItemComment .timeline-content {
    background-image: none !important;
}

.timeline-item.ITILSolution .timeline-content .solimg {
    display: none !important;
}

/*
 * "Das GLPI-Logo in jedem Style mit dem TRFX.DE-Logo darüber, gleich
 * breit wie der TRFX.DE-Schriftzug": replaces GLPI's own logo image
 * (--glpi-logo-* CSS custom properties, see css/includes/_base.scss) with
 * a combined SVG (TRFX.DE wordmark stacked above the original GLPI logo,
 * same width) - one white version (used everywhere via --glpi-logo,
 * always shown against the dark blue --glpi-mainmenu-bg sidebar/header)
 * and one black version (used on the login page's light-theme variant,
 * --glpi-logo-dark-login). The "reduced" (icon-only "G", collapsed
 * sidebar) and the login page's dark-theme white variant intentionally
 * keep referencing the stock assets/other combined file - see below.
 *
 * Both combined SVGs share the exact same aspect ratio (width:height =
 * 406:294.11, from trfxde-glpi-{white,black}.svg's viewBox), so every box
 * below just needs its height recalculated from its own (unchanged)
 * width: height = width * 294.11 / 406.
 */
:root {
    --glpi-logo-light: url("/plugins/servicetabs/public/img/trfxde-glpi-white.svg");
    --glpi-logo-dark: url("/plugins/servicetabs/public/img/trfxde-glpi-black.svg");
    --glpi-logo-dark-login: url("/plugins/servicetabs/public/img/trfxde-glpi-black.svg");
    --glpi-logo-light-login: url("/plugins/servicetabs/public/img/trfxde-glpi-white.svg");
}

.page .glpi-logo {
    height: 72px !important;
    background-size: contain !important;
}

.page-anonymous .glpi-logo {
    height: 145px !important;
    background-size: contain !important;
}
