/*noinspection CssUnresolvedCustomProperty*/
:root {
    --bulma-primary-h: var(--ZFrame-primary-h);
    --bulma-primary-s: var(--ZFrame-primary-s);
    --bulma-primary-l: var(--ZFrame-primary-l);
}

/*noinspection CssUnresolvedCustomProperty*/
body {
    font-family: var(--ZFrame-font-family-all), serif;
}

/*noinspection CssUnresolvedCustomProperty*/
h1,
h2,
h3,
h4,
h5,
h6,
.title {
    font-family: var(--ZFrame-font-family-head), serif;
    font-weight: normal;
}

/*noinspection CssUnresolvedCustomProperty*/
.fixed-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: var(--ZFrame-bg-light-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
}

input::-webkit-calendar-picker-indicator {
    filter: none;
    cursor: pointer;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

@media (prefers-color-scheme: light) {
    color-scheme: light;
}

/*noinspection CssUnresolvedCustomProperty*/
@media (prefers-color-scheme: dark) {
    color-scheme: dark;
    input::-webkit-calendar-picker-indicator {
        filter: invert(1) brightness(2);
    }

    .fixed-bg {
        background-image: var(--ZFrame-bg-dark-url);
    }
}

/*noinspection CssUnresolvedCustomProperty*/
@media (prefers-color-scheme: light) {
    color-scheme: light;

    .fixed-bg {
        background-image: var(--ZFrame-bg-light-url);
    }
}

[data-theme=dark] input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2);
}

/*noinspection CssUnresolvedCustomProperty*/
[data-theme=dark] .fixed-bg {
    background-image: var(--ZFrame-bg-dark-url);
}

[data-theme=light] input::-webkit-calendar-picker-indicator {
    filter: none;
}

/*noinspection CssUnresolvedCustomProperty*/
[data-theme=light] .fixed-bg {
    background-image: var(--ZFrame-bg-light-url);
}

:root,
[data-theme=light],
[data-theme=dark] {
    --bulma-shadow-color: rgba(0, 0, 0, 0.25);
    --bulma-shadow: 0 0.5em 1em -0.125em var(--bulma-shadow-color),
    0 0px 0 1px var(--bulma-shadow-color);
    --bulma-modal-background-background-color: rgba(0, 0, 0, 0.5);
}

/* Fixed-height placeholder for paginated table on-load content */
.zframe-onload-pagination {
    --zframe-skeleton-rows: 10;
    --zframe-skeleton-gap: 0.5rem;
    /* Match skeleton blocks closer to a table row height */
    --bulma-skeleton-block-min-height: 3.11em;
}

.zframe-onload-pagination {
    /* Lock the placeholder height to prevent layout shift */
    height: calc((var(--bulma-skeleton-block-min-height) + var(--zframe-skeleton-gap)) * var(--zframe-skeleton-rows) - var(--zframe-skeleton-gap));
}

.zframe-skeleton-pagination {
    display: grid;
    grid-auto-rows: var(--bulma-skeleton-block-min-height);
    row-gap: var(--zframe-skeleton-gap);
}

.navbar-spacer {
    height: 75px;
}

.navbar-item {
    gap: 0.25rem;
    /* smaller than the default 0.75rem */
}

.navbar .navbar-logo {
    min-height: 2rem;
    object-fit: contain;
}

.fa-sun {
    color: gold;
}

.fa-moon {
    color: dodgerblue;
}

.fa-desktop {
    color: gray;
}

/* Modal animations */
@keyframes slideDownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-100vh);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.is-active .modal-background {
    animation: fadeIn 0.5s ease-out forwards;
}

.modal.is-active .modal-card {
    animation: slideDownFadeIn 0.5s cubic-bezier(0, 0, 0, 1) forwards;
}

@property --bulma-text {
    syntax: "*";
    inherits: true;
    initial-value: "";
}

@property --bulma-background {
    syntax: "*";
    inherits: true;
    initial-value: "";
}

@property --bulma-primary {
    syntax: "*";
    inherits: true;
    initial-value: "";
}

.qrcode svg {
    width: 250px;
    height: 250px;
    color: var(--bulma-text);
    background-color: var(--bulma-background);
    border: 3px solid var(--bulma-primary);
    border-radius: 0.5rem;
}

.qrcode path {
    fill: var(--bulma-text);
}

/* Thin drop shadow helper */
.has-thin-shadow {
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.4);
}

.fa-slow {
    animation-duration: 3s;
}

/* ─────────────────────────────────────────────
   NAV CLEARANCE
   ───────────────────────────────────────────── */
:root {
    --za-navbar-height: 60px;
}

/* Pushes the entire page body below the navbar */
body {
    padding-top: var(--za-navbar-height);
}

/* Anchored section links (#hero, #features etc.)
   won't hide their headings behind the bar     */
[id] {
    scroll-margin-top: var(--za-navbar-height);
}

/* Bulma hero full-height compensation —
   subtract the navbar from 100vh so the hero
   body doesn't overflow at the bottom         */
.hero.is-fullheight,
.hero.is-fullheight-with-navbar {
    min-height: calc(100vh - var(--za-navbar-height));
}

/* Small screen specific safety net —
   Bulma collapses the burger at <= 1023px,
   navbar height stays 60px but double-check
   if yours grows taller on very small viewports */
@media screen and (max-width: 768px) {
    :root {
        --za-navbar-height: 60px; /* adjust if mobile nav is taller */
    }
}