/* Joined by the theme (includes/core/assets/css-bundle.php) from:
/wp-content/themes/nuzp/assets/css/css-blocks/header/doodles.css:1796500037
/wp-content/themes/nuzp/assets/css/css-components/widget-calendar.css:1796500037
*/

/* /wp-content/themes/nuzp/assets/css/css-blocks/header/doodles.css */
/*
 * Святкові дудли: the drawings over the header logo on a holiday.
 * Loaded by assets/js/layout/doodles.js only on a day with a doodle, and on
 * the doodles screen in wp-admin for the previews. The drawings themselves are
 * in includes/sections/site/doodles/library.php.
 *
 * Nothing here moves the logo: every layer is absolutely placed, and the room
 * the wordmark gets above and below its letters is taken back by a negative
 * margin. Motion is transform and opacity only, and the header's own shrink on
 * scroll is left alone (see the note header-logo-stutter).
 */

.logo-link--doodle {
  --dd-snow: #8db6e3;
  --dd-snow-edge: #b9d2ec;
  --dd-ice-a: #ffffff;
  --dd-ice-b: #cfe8fd;
  --dd-ice-edge: #9cc6ee;
  --dd-vane: #ffffff;
  --dd-ink: #2062af;
  /* The garland: a thin gold wire; a bead that is off goes pale, not dark,
     and the glow is faint on white paper, where a full one smudged. */
  --dd-wire: #d2a93a;
  --dd-dim: #ffffff;
  --dd-glow: 0.45;
  --dd-wood: #6b4423;
  --dd-stitch: #1a1a1a;
  --dd-blue: #0057b7;
}

html[data-theme="dark"] .logo-link--doodle,
.dd-dark .logo-link--doodle {
  --dd-snow: #ffffff;
  --dd-snow-edge: transparent;
  --dd-ice-a: #f4faff;
  --dd-ice-b: #b4daf7;
  --dd-ice-edge: #7fb2e6;
  --dd-vane: #e6ebf2;
  --dd-ink: #8fb8f0;
  --dd-wire: #b8933a;
  --dd-dim: #161b1f;
  --dd-glow: 0.9;
  --dd-wood: #b48a62;
  --dd-stitch: #e9e1d2;
  --dd-blue: #4a95ec;
}

.dd-layer {
  position: absolute;
  pointer-events: none;
}

/* What doodles.js lays out in pixels: garlands and the picture beside the wordmark. */
.logo-link--doodle {
  position: relative;
}

.dd-letters {
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 3;
}

/* Under the wordmark (z-index 1) and the shield (2): it peeks out from behind them. */
.dd-side {
  z-index: 0;
}

.dd-g {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
}

.dd-side svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}


/*
 * What hangs on the wordmark from outside its box leaves and comes back with
 * it on scroll in the very same motion: the wordmark's own transition from
 * logo.css (0.5s ease-in-out, fading while moving 15px left). (Drawn inside
 * the wordmark's clipped box instead, the garland was not painted by Chrome.)
 */
.dd-letters,
.dd-side {
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.header._scrolled .dd-letters,
.header._scrolled .dd-side {
  opacity: 0;
  transform: translateX(-15px);
}

/*
 * The wordmark does not only fade: its box closes from the right and its left
 * margin goes. The garland follows both, or its lights hung on at full length
 * under half a word. Its layer is a twin of that box (doodles.js puts the
 * box's place, margin and max-width on it) and closes with the very same
 * properties and transition as logo.css gives the box. An exception to
 * «transform and opacity only», on purpose: a twin that slid and cut the
 * garland by transforms ran on the compositor while the box closed on the
 * main thread, and on a busy scroll the two drifted apart (2026-11-30).
 */
.dd-letters {
  overflow: hidden;
  margin-left: var(--dd-ml, 0px);
  max-width: var(--dd-mw, none);
  transition: 0.5s ease-in-out;
  transition-property: max-width, margin-left, opacity, transform;
}

.header._scrolled .dd-letters {
  max-width: 0;
  margin-left: 0;
}

/*
 * The lights: doodles.js sets the pattern on the garland about once a second,
 * and a bead eases between on and dimmed instead of flicking, so the strand
 * glows rather than flickers (the owner, 2026-11-30: «глаза не мусолили»).
 */
.dd-gb__dim {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.dd-gb__glow {
  opacity: var(--dd-glow);
  transition: opacity 0.6s ease-in-out;
  /* A bulb under the pointer flares from its own centre (doodles.js). */
  transform-box: fill-box;
  transform-origin: center;
}

/* Flakes shaken off the pompom (doodles.js), over the shield's edge. */
.dd-puff {
  z-index: 4;
}

.dd-g[data-p="c0"] .dd-gb:not(.dd-gb--m0) .dd-gb__dim,
.dd-g[data-p="c1"] .dd-gb:not(.dd-gb--m1) .dd-gb__dim,
.dd-g[data-p="c2"] .dd-gb:not(.dd-gb--m2) .dd-gb__dim,
.dd-g[data-p="off"] .dd-gb__dim,
.dd-g[data-p="odd"] .dd-gb--even .dd-gb__dim,
.dd-g[data-p="even"] .dd-gb--odd .dd-gb__dim {
  opacity: 0.35;
}

.dd-g[data-p="c0"] .dd-gb:not(.dd-gb--m0) .dd-gb__glow,
.dd-g[data-p="c1"] .dd-gb:not(.dd-gb--m1) .dd-gb__glow,
.dd-g[data-p="c2"] .dd-gb:not(.dd-gb--m2) .dd-gb__glow,
.dd-g[data-p="off"] .dd-gb__glow,
.dd-g[data-p="odd"] .dd-gb--even .dd-gb__glow,
.dd-g[data-p="even"] .dd-gb--odd .dd-gb__glow {
  opacity: calc(var(--dd-glow) * 0.35);
}

/* The shield's layers span −16…70 × −16…69 in its 54 × 53 coordinates. */
.dd-shield {
  left: -29.63%;
  top: -30.19%;
  width: 159.26%;
  height: 160.38%;
}

.dd-shield svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dd-shield--back {
  z-index: -1;
}

.dd-shield--front {
  z-index: 1;
}

/* 8px of room above and below the letters, inside the box that hides the wordmark on scroll. */
.logo-link--doodle .logo-link__text {
  padding-block: 8px;
  margin-block: -8px;
}


.dd-text {
  inset: 0;
  z-index: 1;
}

.dd-text > svg {
  position: absolute;
  overflow: visible;
}

.dd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------ shared motions */

@keyframes dd-in {
  from { opacity: 0; }
}

@keyframes dd-pop {
  from { opacity: 0; transform: scale(0.2); }
}

@keyframes dd-reveal {
  from { transform: scaleX(0); }
}

@keyframes dd-twinkle {
  50% { opacity: 0.35; }
}

@keyframes dd-swing {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}

.dd-pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: dd-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.dd-pop--2 { animation-delay: 0.15s; }
.dd-pop--3 { animation-delay: 0.3s; }

.dd-fade {
  animation: dd-in 1.6s ease-out both;
}

/* A shine across the shield now and then (Конституція, Захисники). */
.dd-shine {
  animation: dd-shine 6s ease-in-out 1s infinite;
}

@keyframes dd-shine {
  0% { transform: translateX(0); }
  30%, 100% { transform: translateX(110px); }
}

/* ------------------------------------------------ Новий рік */

/*
 * The scene, shown once (see «entrance shown once» below): the hand brings the hat, sets it down with a
 * little bounce and goes (1.1s – 3.3s); then the strand of lights under the
 * wordmark comes on. Hat and hand move together until the hat lands; both use
 * the layer's own origin, so their paths match. At rest the hat is on and
 * the hand is gone, which is also what visitors who ask for less motion see.
 */

.dd-hat {
  animation: dd-hat-in 2.2s cubic-bezier(0.35, 0.6, 0.3, 1) 1.1s both;
}

@keyframes dd-hat-in {
  0% { transform: translate(-44px, -40px) rotate(-10deg); opacity: 0; }
  8% { opacity: 1; }
  48% { transform: translate(0, -8px) rotate(-2deg); }
  60% { transform: translate(0, 0); }
  67% { transform: translate(0, -1.6px); }
  74%, 100% { transform: translate(0, 0); }
}

.dd-hand {
  opacity: 0;
  animation: dd-hand-in 2.2s cubic-bezier(0.35, 0.6, 0.3, 1) 1.1s both;
}

@keyframes dd-hand-in {
  0% { transform: translate(-44px, -40px) rotate(-10deg); opacity: 0; }
  8% { opacity: 1; }
  48% { transform: translate(0, -8px) rotate(-2deg); opacity: 1; }
  60% { transform: translate(0, 0); opacity: 1; }
  66% { transform: translate(0, 0); opacity: 1; }
  92%, 100% { transform: translate(-38px, -36px); opacity: 0; }
}

/*
 * Phones: the shield stands alone in a 56px bar and the hat rises about a
 * fifth of the shield above it, so it touched the top of the screen while
 * 8px stayed under the shield. A size smaller and set a little lower, the
 * shield with its hat has the same room above and below, about 6px (the
 * owner, 2026-11-30). Sizes and spacing only; `top`, not a transform, so the
 * header's own scale on scroll is left alone.
 */
@media (max-width: 480px) {
  .logo-link--doodle.dd--new-year .logo-link__label {
    top: 3.6px;
    width: 36px;
    height: 36px;
  }
}

/* The hat's shadow on the shield comes as the hat lands. */
.dd-hat-shadow {
  animation: dd-in 0.4s ease-out 2.4s both;
}

.dd-pompom {
  transform-box: fill-box;
  transform-origin: 0 30%;
  animation: dd-pompom 2.8s ease-in-out 3.3s infinite;
}

@keyframes dd-pompom {
  0%, 100% { transform: rotate(0); }
  35% { transform: rotate(9deg); }
  70% { transform: rotate(-5deg); }
}

/*
 * The boxes the snow falls in: in front of the wordmark, and behind the
 * wordmark (z-index 1) and the shield (2), where a flake shows between the
 * letters and at the shield's edges.
 */
.dd-snowfall {
  z-index: 4;
  overflow: hidden;
  transition: opacity 0.3s ease;
  /* A layer of its own: fading out with the header must not repaint it. The
     flakes keep their size, so the layer stays sharp. */
  will-change: opacity;
}

.header._scrolled .dd-snowfall {
  opacity: 0;
}

/*
 * Small snowflakes falling through the boxes, never past them. doodles.js
 * wraps each flake: the wrapper falls the whole height of its box at an even
 * pace (--dd-fall: from just above the box to its bottom edge) and fades only
 * on that edge; the flake inside sways from side to side as it turns
 * (--dd-sway, --dd-turn), on a beat of its own. Pace, sway, beat, size and
 * start differ for every flake and every page, so no two fall alike (the
 * owner, 2026-11-30: they fell alike and faded halfway).
 */
.dd-flake {
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  animation: dd-fall 6s linear infinite;
}

.dd-snow {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: dd-sway 2.4s ease-in-out infinite alternate;
}

@keyframes dd-fall {
  0% { transform: translateY(-12px); opacity: 0; }
  8%, 88% { opacity: 1; }
  100% { transform: translateY(var(--dd-fall, 60px)); opacity: 0; }
}

@keyframes dd-sway {
  0% { transform: translateX(calc(-1 * var(--dd-sway, 3px))) rotate(calc(-1 * var(--dd-turn, 40deg))); }
  100% { transform: translateX(var(--dd-sway, 3px)) rotate(var(--dd-turn, 40deg)); }
}

.dd-snowfall--back {
  z-index: 0;
}

/* Beside the shield a flake falls seldom: in a third of its cycle, then it waits unseen. */
.dd-flake--rare {
  animation-name: dd-fall-rare;
}

@keyframes dd-fall-rare {
  0% { transform: translateY(-12px); opacity: 0; }
  3%, 29% { opacity: 1; }
  33%, 100% { transform: translateY(var(--dd-fall, 60px)); opacity: 0; }
}

/*
 * Frost on the letters (library.php draws it to the wordmark's measured
 * letters, doodles.js lays it over the wordmark picture): a thin glassy rim
 * on each top face and a few small icicles.
 */
.dd-ice {
  z-index: 1;
  animation: dd-in 1.2s ease-out 0.4s both;
}

.dd-ice svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ------------------------------------------------ entrance shown once */

/*
 * A doodle comes in with a motion (the hand brings the hat, the lights come
 * on, the ornaments pop up) once; after that it opens already in place
 * (doodles.js adds the class; localStorage remembers for 12 hours). Stronger
 * than any drawing's own entrance rule, which may be more specific.
 */
.logo-link--dd-seen :is(.dd-g, .dd-ice, .dd-hat, .dd-hat-shadow, .dd-hand, .dd-pop, .dd-grow, .dd-chain, .dd-band, .dd-swash, .dd-fade, .dd-link) {
  animation: none !important;
}

/* ------------------------------------------------ less motion */

/*
 * variables.css shortens every animation to 1ms for these visitors; a 1ms
 * animation would leave a firework or a snowflake at its last frame, gone.
 * Without animation each drawing stands at rest, whole.
 */
@media (prefers-reduced-motion: reduce) {
  .logo-link--doodle .dd-layer,
  .logo-link--doodle .dd-layer * {
    animation: none !important;
  }

  .dd-fill,
  .dd-snowfall {
    display: none;
  }
}

/*
 * The same for «Без анімацій» of the accessibility panel (ms-accessibility),
 * which stops every animation on the page with a class on <html>. Snow that
 * stood still in the air would only look like specks, so it goes; the
 * garland's lights stay on without blinking (doodles.js).
 */
html.accessibility-no-anim .dd-fill,
html.accessibility-no-anim .dd-snowfall {
  display: none;
}


/* /wp-content/themes/nuzp/assets/css/css-components/widget-calendar.css */
/*
 * Events calendar widget: the floating button and the side panel
 * (template-parts/layout/common/widget-calendar.php). Printed inline on every
 * page until 2026-09; as a file the browser caches it between pages.
 */
.calendar-widget-btn {
    position: fixed;
    z-index: 9981;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: var(--color-blue-200);
    border: 1px solid var(--color-white);
    color: var(--color-white);
    cursor: pointer;
    outline: none;
    padding: 0;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(var(--color-blue-200--rgb), 0.15);
    right: max(10px, env(safe-area-inset-right));
    bottom: max(15px, env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
}

@media (hover: hover) {
    .calendar-widget-btn:hover {
        background: var(--color-blue-200);
        box-shadow: 0 10px 20px rgba(225, 29, 72, 0.2);
        width: 150px;
    }
}

.calendar-widget-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    width: 42px;
    height: 42px;
}

.calendar-widget-btn__icon svg {
    width: 20px;
    height: 20px;
}

.calendar-widget-btn__text {
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.85rem;
    padding-right: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

@media (hover: hover) {
    .calendar-widget-btn:hover .calendar-widget-btn__text {
        opacity: 1;
        transition-delay: 0.1s;
    }
}

.calendar-widget-btn__counter {
    position: absolute;
    background-color: var(--color-red);
    color: #ffffff;
    border: 2px solid var(--color-blue-200);
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1px 0 0;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    opacity: 0;
    transform: scale(0);
    box-sizing: border-box;
    pointer-events: none;
}

.calendar-widget-btn__counter.has-new {
    opacity: 1;
    transform: scale(1);
}

/*
 * The card a page link points at is ringed in navy on the light page; on
 * the dark one navy would vanish, so the ring and its wash turn blue.
 */
.calendar-side-panel {
    --cal-highlight: var(--color-blue-200);
    --cal-highlight-bg: #f0f7ff;
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    visibility: hidden;
    width: 100%;
    height: 100%; 
    height: 100dvh;
    background: var(--color-bg-secondary);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.5s;
    will-change: transform;
}

html[data-theme="dark"] .calendar-side-panel {
    --cal-highlight: var(--color-accent);
    --cal-highlight-bg: rgba(62, 166, 255, 0.1);
}

.calendar-side-panel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-image: url("/wp-content/themes/nuzp/assets/media/general/nuzp-shield.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.ui-dialog.is-open > .calendar-side-panel {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0s;
}

.calendar-side-panel__header {
    background: var(--color-blue-200);
    color: var(--color-white);
    padding: max(16px, env(safe-area-inset-top)) 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.calendar-side-panel__header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-side-panel__header-top h3 {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
    font-weight: 700;
}

#calendarWidgetClose {
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: transform 0.2s, opacity 0.2s;
    border-radius: 0;
}

@media (hover: hover) {
    #calendarWidgetClose:hover {
        opacity: 1;
    }
}

.calendar-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Shown when a unit's page opened the calendar with its events only: which place, and the way back to all. */
.calendar-place-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
}

.calendar-place-filter[hidden] {
    display: none;
}

.calendar-place-filter__clear {
    flex-shrink: 0;
    padding: 0;
    background: none;
    border: none;
    color: var(--color-white);
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.cal-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

@media (hover: hover) {
    .cal-nav-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    flex-grow: 1;
    margin: 0 10px;
    display: flex;
    justify-content: center;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    transition: background 0.2s ease;
}

@media (hover: hover) {
    .custom-select-trigger:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

.custom-select-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.02em;
}

.custom-select-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    opacity: 0.9;
}

.custom-select-wrapper.is-open .custom-select-icon {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    box-shadow: 0 15px 35px rgba(var(--color-blue-200--rgb), 0.2);
    width: max-content;
    min-width: 160px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    transition-property: opacity, transform, visibility;
    max-height: 280px;
    overflow-y: auto;
}

.custom-select-wrapper.is-open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.custom-select-options::-webkit-scrollbar {
    width: 4px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}
.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--color-border);
}

/* Firefox has no ::-webkit-scrollbar: the same colours from the standard properties. */
@supports not selector(::-webkit-scrollbar) {
    .custom-select-options {
        scrollbar-width: thin;
        scrollbar-color: var(--color-border) var(--color-bg-secondary);
    }
}

.custom-select-option {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-heading);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-align: center;
    border-bottom: 1px solid rgba(var(--color-ink--rgb), 0.06);
}

.custom-select-option:last-child {
    border-bottom: none;
}

@media (hover: hover) {
    .custom-select-option:hover {
        background: var(--color-bg-secondary);
        color: var(--color-accent);
    }
}

.custom-select-option.is-selected {
    background: var(--color-blue-200);
    color: var(--color-white);
}

.calendar-side-panel__content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; 
}

.calendar-card {
    display: flex;
    align-items: stretch;
    background: var(--color-surface-card);
    border: 1px solid var(--color-border-strong);
    border-radius: 0;
    margin-bottom: 12px;
    text-decoration: none;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    opacity: 0;
    will-change: transform, opacity;
    position: relative;
    cursor: pointer;
}

.calendar-card__overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-indent: -9999px;
    overflow: hidden;
}

.ui-dialog.is-open > .calendar-side-panel .calendar-card {
    animation: fadeSlideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Only the first cards cascade, and quickly: a longer stagger made the tenth
   card appear a full second after the tap. */
.ui-dialog.is-open > .calendar-side-panel .calendar-card:nth-child(2) { animation-delay: 0.04s; }
.ui-dialog.is-open > .calendar-side-panel .calendar-card:nth-child(3) { animation-delay: 0.08s; }
.ui-dialog.is-open > .calendar-side-panel .calendar-card:nth-child(n+4) { animation-delay: 0.12s; }
@media (hover: hover) {
    .calendar-card:hover {
        box-shadow: 0 5px 15px rgba(var(--color-blue-200--rgb), 0.1);
    }
}

.calendar-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-blue-200);
    color: var(--color-white);
    padding: 12px 8px;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

@media (max-width: 899px) {
    .calendar-card__date{
        min-width: 0;
    }
}

.calendar-card__date .month {
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.8;
}

.calendar-card__date .day {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 4px;
}

.calendar-card__date .dow {
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.8;
    margin-top: 4px;
}

.calendar-card__info {
    padding: 12px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.calendar-card__badge {
    display: inline-block;
    color: var(--color-white);
    background: var(--color-blue-100);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    width: max-content;
    line-height: 1.2;
}

.calendar-card__cats {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 4px;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.3;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--color-border);
    position: relative;
    z-index: 2;
}

.calendar-card__cats-list {
    display: inline;
    flex-wrap: wrap;
}

.calendar-card__cat-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 3;
    transition: color 0.2s ease;
}

.calendar-card__cat-sep {
    color: var(--color-border);
    margin-right: 3px;
    font-weight: 400;
}

.calendar-card.is-past .calendar-card__cats {
    opacity: 0.5;
    border-top-color: var(--color-border);
}

.calendar-card.is-past .calendar-card__cat-link {
    color: var(--color-text-muted);
}

@media (hover: hover) {
    .calendar-card__cat-link:hover {
        color: var(--color-text-heading);
        text-decoration: underline;
    }
}

.calendar-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 6px;
}

.calendar-card__title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-heading);
    margin-bottom: 0;
    transition: color 0.2s;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

@media (hover: hover) {
    .calendar-card:hover .calendar-card__title {
        color: var(--color-link);
    }
}

.calendar-card__note {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-top: -2px;
    margin-bottom: 4px;
}

.pinned-icon {
    color: var(--color-text-heading);
    flex-shrink: 0;
    margin-top: 3px; 
}

.calendar-card__meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calendar-card__meta {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1;
}

.calendar-card__meta svg {
    margin-right: 5px;
    opacity: 0.7;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.calendar-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    border-left: 1px solid var(--color-border);
    color: var(--color-text-heading);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
    transition: 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    transition-property: color, background-color, border-color;
}

@media (hover: hover) {
    a.calendar-card:hover .calendar-card__arrow {
        background: var(--color-blue-200);
        color: var(--color-white);
        border-color: var(--color-blue-200);
    }
}

.calendar-card.is-past {
    border-color: var(--color-border);
    background: var(--color-bg-secondary);
}

.calendar-card.is-past .calendar-card__date {
    background: var(--color-border);
    color: var(--color-text-secondary);
}

.calendar-card.is-past .calendar-card__title {
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.calendar-card.is-past .calendar-card__meta {
    color: var(--color-text-muted);
}

.calendar-card.is-featured {
    border-color: #3b82f6; 
    background: rgba(59, 130, 246, 0.05);
}

.calendar-card.is-featured .calendar-card__date {
    color: var(--color-white);
}

.calendar-card.is-featured.is-past {
    border-color: var(--color-border);
    background: var(--color-bg-secondary);
}

.calendar-card.is-featured.is-past .calendar-card__date {
    background: var(--color-border);
    color: var(--color-text-secondary);
}

.calendar-card.is-featured.is-past .pinned-icon {
    color: var(--color-accent);
}

.calendar-card.is-target-highlight {
    border-color: var(--cal-highlight) !important;
    background: var(--cal-highlight-bg) !important;
    box-shadow: 0 0 0 2px var(--cal-highlight), 0 8px 24px rgba(var(--color-blue-200--rgb), 0.22) !important;
    transform: translateY(-2px);
    position: relative;
    z-index: 2;
    transition: 0.35s ease;
    transition-property: color, background-color, border-color, box-shadow, transform;
}

.calendar-card.is-target-highlight .calendar-card__date {
    background: var(--color-blue-200) !important;
    color: var(--color-white) !important;
}

.calendar-card.is-target-highlight .calendar-card__date .month,
.calendar-card.is-target-highlight .calendar-card__date .day,
.calendar-card.is-target-highlight .calendar-card__date .dow {
    color: var(--color-white) !important;
}

.calendar-group-divider {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin: 15px -20px 8px;
    padding: 0 20px 4px;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: -20px;
    background: var(--color-bg-secondary);
    z-index: 2;
}

.calendar-side-panel__content > .calendar-ptr-spinner + .calendar-events-group .calendar-group-divider,
.calendar-side-panel__content > .calendar-events-group:first-child .calendar-group-divider {
    margin-top: 0;
}

.calendar-ptr-spinner {
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-heading);
    transition: height 0.2s ease;
}

.calendar-ptr-spinner svg {
    width: 24px;
    height: 24px;
}

/* Turns only while the panel is pulled down (widget-calendar.js). Turning for
   good inside the hidden panel, it was work on every frame of every page. */
.calendar-ptr-spinner.is-active svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.calendar-side-panel__footer {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    background: var(--color-surface-card);
    border-top: 1px solid var(--color-border-strong);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.calendar-footer-btn {
    flex: 1;
}

.calendar-widget-overlay {
    position: fixed;
    inset: 0;
    background: rgba(var(--color-blue-200--rgb), 0.6); 
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    /* Same clock and curve as the panel, so the page stops dimming when the panel lands. */
    transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.5s;
    touch-action: none;
}

.ui-dialog.is-open > .calendar-widget-overlay {
    opacity: 1;
    visibility: visible;
}

#toTop {
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 50px) !important;
    width: 42px !important;
    height: 42px !important;
}

#toTop svg {
    width: 20px !important;
    height: 20px !important;
}

.calendar-side-panel__content::-webkit-scrollbar {
    width: 6px;
}
.calendar-side-panel__content::-webkit-scrollbar-track {
    background: var(--color-bg-secondary); 
}
.calendar-side-panel__content::-webkit-scrollbar-thumb {
    background: var(--color-border); 
}

/* Firefox has no ::-webkit-scrollbar: the same colours from the standard properties. */
@supports not selector(::-webkit-scrollbar) {
    .calendar-side-panel__content {
        scrollbar-width: thin;
        scrollbar-color: var(--color-border) var(--color-bg-secondary);
    }
}
@media (hover: hover) {
    .calendar-side-panel__content::-webkit-scrollbar-thumb:hover {
        background: var(--color-text-muted); 
    }
}

.calendar-card, .calendar-widget-btn, #calendarWidgetClose, .cal-nav-btn {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 899px) {
    .calendar-widget-btn:active,
    .calendar-card:active,
    #calendarWidgetClose:active {
        transform: scale(0.96) !important;
        transition: transform 0.1s ease !important;
    }
}

@media (min-width: 600px) {
    .calendar-widget-btn {
        right: 15px;
        bottom: 15px;
        width: 52px;
        height: 52px;
    }
    @media (hover: hover) {
        .calendar-widget-btn:hover {
            width: 175px;
        }
    }
    .calendar-widget-btn__icon {
        width: 52px;
        height: 52px;
    }
    .calendar-widget-btn__icon svg {
        width: 26px;
        height: 26px;
    }
    .calendar-widget-btn__counter {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
        border-radius: 0;
        padding: 0 1px 0 0;
    }
    #toTop {
        right: 15px !important;
        bottom: 75px !important;
        width: 52px !important;
        height: 52px !important;
        background-color: var(--color-blue-200) !important;
    }
    #toTop svg {
        width: 26px !important;
        height: 26px !important;
    }
}

@media (min-width: 900px) {
    .calendar-side-panel {
        width: 480px;
    }
    .calendar-side-panel__header {
        padding: 15px 30px;
        gap: 16px;
    }
    .calendar-side-panel__header-top h3 {
        font-size: 0.95rem;
    }
    .custom-select-label {
        font-size: 1.25rem;
    }
    .calendar-side-panel__content {
        padding: 25px;
    }
    .calendar-group-divider {
        margin: 15px -25px 8px;
        padding: 5px 25px 5px;
        top: -25px;
    }
    .calendar-side-panel__content > .calendar-ptr-spinner + .calendar-events-group .calendar-group-divider,
    .calendar-side-panel__content > .calendar-events-group:first-child .calendar-group-divider {
        margin-top: 0;
    }
    .calendar-side-panel__footer {
        padding: 20px 25px;
        gap: 15px;
    }
    .calendar-card__date .dow {
        font-size: 0.8rem;
    }
    .cal-nav-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 899px) {
    .custom-select-label {
        font-size: 0.95rem;
    }
    .calendar-side-panel__header {
        padding: max(12px, env(safe-area-inset-top)) 15px 10px;
        gap: 8px;
    }
    .calendar-side-panel__content {
        padding: 15px;
    }
    .calendar-group-divider {
        margin: 15px -15px 8px;
        padding: 5px 15px 5px;
        top: -15px;
    }
    .calendar-side-panel__content > .calendar-ptr-spinner + .calendar-events-group .calendar-group-divider,
    .calendar-side-panel__content > .calendar-events-group:first-child .calendar-group-divider {
        margin-top: 0;
    }
    .calendar-side-panel__footer {
        padding: 12px 15px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        gap: 8px;
    }
    .calendar-card {
        margin-bottom: 8px;
    }
    .calendar-card__date {
        padding: 8px 4px;
        min-width: 44px;
    }
    .calendar-card__date .month {
        font-size: 0.6rem;
    }
    .calendar-card__date .day {
        font-size: 1.15rem;
        margin-top: 2px;
    }
    .calendar-card__date .dow {
        font-size: 0.6rem;
        margin-top: 2px;
    }
    .calendar-card__info {
        padding: 6px 10px;
    }
    .calendar-card__title {
        font-size: 0.85rem;
    }
    .calendar-card__badge {
        font-size: 0.68rem;
        padding: 1px 5px;
        margin-bottom: 2px;
    }
    .calendar-card__cats {
        font-size: 0.68rem;
        margin-top: 4px;
        padding-top: 4px;
    }
    .calendar-card__meta {
        font-size: 0.75rem;
    }
    .calendar-card__arrow {
        width: 32px;
    }
    .calendar-card__arrow svg {
        width: 16px;
        height: 16px;
    }
}

.calendar-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.calendar-skeleton-card {
    display: flex;
    height: 70px;
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    animation: pulseSkel 1.5s infinite ease-in-out;
}
.calendar-skeleton-date {
    width: 60px;
    background: var(--color-border);
}
.calendar-skeleton-info {
    flex: 1;
    padding: 15px;
}
.calendar-skeleton-line {
    height: 12px;
    background: var(--color-border);
    margin-bottom: 8px;
    border-radius: 2px;
}
.calendar-skeleton-line.short {
    width: 60%;
}
@keyframes pulseSkel {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.3; }
}

