/* dl-pop — the stylesheet half of the popover positioning engine.
   ==========================================================================
   Deliberately tiny. The engine writes position/left/top/width/max-height as
   inline `!important` because the legacy offsets it replaces are `!important`
   too; what belongs here is only what cannot be an inline style: the stacking
   level, the scroll behaviour of a clamped panel, and the two states the
   engine expresses as classes.

   Nothing here sets a colour, a font, a padding or a size. A panel positioned
   by the engine looks exactly like the panel the markup declared — that is the
   whole reason panels are positioned where they sit in the DOM rather than
   portalled to <body>, which would have dropped them out of every descendant
   selector that styles them. */

/* Above the task table and its sticky header (z-index 4) and above the fixed
   app header (1025), but below the modal backdrop (1040) and modals (1050) —
   a popover must never float over a dialog. */
.dl-pop__panel {
    z-index: 1035 !important;
    box-sizing: border-box !important;
}

/* Set only when a panel is taller than the room on both sides of its trigger.
   The engine caps the height; this is what makes the capped panel scroll
   instead of hiding its tail. */
.dl-pop__panel.dl-pop--clamped {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
}

/* The trigger has scrolled out of its scroll container (or off screen). The
   panel stays open and keeps its place in the DOM — it is simply not drawn,
   so it cannot sit stranded on screen with nothing under it. */
.dl-pop__panel.dl-pop--hidden {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* The recurring card draws its own pointer at the top edge, aimed at the icon
   above it. When the engine flips the card above its trigger the pointer has
   to move to the bottom edge and turn over, or it points at nothing. */
.reccuringTaskBox.dl-pop--top::before {
    top: auto !important;
    bottom: -20px !important;
    border-bottom: 0 !important;
    border-top: 20px solid #fff;
}

body.dark-mode .reccuringTaskBox.dl-pop--top::before {
    border-top-color: #000000;
}
