/* =========================================================================
   TOP NOTICE BAR — obvestilo nad headerjem (FABLE tema)
   Vklop/izklop, besedilo, povezava in trajanje skritja: uredi v
   Videz > Nastavitve teme (oc-content/themes/fable/admin/settings.php).
   Markup: fable_top_notice() v functions.php, hook 'body_top' (header.php).
   ========================================================================= */
.fable-top-notice {
    --fable-notice-bg: #1a1a1a;
    --fable-notice-color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--fable-notice-bg);
    color: var(--fable-notice-color);
    padding: 10px 44px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

.fable-top-notice-link {
    color: var(--fable-notice-color);
    text-decoration: underline;
}

.fable-top-notice-link:hover {
    opacity: .85;
}

/* cela vrstica je povezava (nevidna plast čez obvestilo); gumb X ostane nad njo */
.fable-top-notice-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.fable-top-notice-close {
    position: absolute;
    z-index: 1;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .15);
    border: none;
    color: var(--fable-notice-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.fable-top-notice-close:hover {
    background: rgba(255, 255, 255, .3);
}

.fable-top-notice-hidden {
    display: none !important;
}

/* Sobivanje z core admin trakom (#header-admin), enak vzorec kot pri
   header.site-header v style-child.css: dva selektorja, class fallback
   + :has() za prikaz brez flash-a na prvi izris. */
body.osc-has-admin-header .fable-top-notice,
body:has(#header-admin) .fable-top-notice {
    margin-top: 34px;
}

@media screen and (max-width: 767px) {
    .fable-top-notice {
        padding: 10px 38px;
        font-size: 12.5px;
    }
    body.osc-has-admin-header .fable-top-notice,
    body:has(#header-admin) .fable-top-notice {
        margin-top: 46px;
    }
}

/* Rebrand thatbike (1. 11. 2026): na vseh straneh trak kot na domači strani V1 (css/home-v1.css) — Ink #0A0A0A z
   besedilom v Volt Lime #D4FF3A, vzorec simbola thatbike na 4 %, ki se ob straneh izgubi, hover posvetli trak v #1F1F1F. */
.fable-top-notice {
    --fable-notice-bg: #0A0A0A;
    --fable-notice-color: #D4FF3A;
    transition: background-color .15s ease;
    background-image:
        linear-gradient(to right, var(--fable-notice-bg) 0%, transparent 25%, transparent 75%, var(--fable-notice-bg) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-27.72 -6.9 97.22 58.9'%3E%3Cg opacity='.04' fill='%23FFFFFF' stroke='%23FFFFFF' stroke-width='8' stroke-linejoin='round'%3E%3Cpath d='M10.24 48 L58 4 L58 48 Z'/%3E%3Cpath d='M31.54 -2.9 L-16.22 41.1 L-16.22 -2.9 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat, repeat-x;
    background-position: 0 0, left center;
    background-size: 100% 100%, auto 100%;
}

.fable-top-notice:has(.fable-top-notice-link:hover) {
    --fable-notice-bg: #1F1F1F;
}

.fable-top-notice-link,
.fable-top-notice-link:hover,
html[data-theme="dark"] .fable-top-notice-link {
    color: var(--fable-notice-color);
    text-decoration: none;
    opacity: 1;
}

.fable-top-notice-link:focus-visible {
    outline: none;
}

.fable-top-notice-link:focus-visible::after {
    outline: 2px solid var(--fable-notice-color);
    outline-offset: -3px;
}

/* Dva trakova hkrati (1. 11. 2026): obvestilo o pogojih (fable_gdpr, notice.php) je umirjen svetlo siv trak, rebrand
   ostane temen. Odmik za admin trak dobi samo prvi trak, sicer med njima ostane prazen pas. */
.fable-top-notice ~ .fable-top-notice,
body.osc-has-admin-header .fable-top-notice ~ .fable-top-notice,
body:has(#header-admin) .fable-top-notice ~ .fable-top-notice {
    margin-top: 0;
}

.fable-top-notice.fable-top-notice--quiet,
.fable-top-notice.fable-top-notice--quiet:has(.fable-top-notice-link:hover) {
    --fable-notice-bg: #F2F2F4;
    --fable-notice-color: #4A4A4F;
    background-image: none;
    border-bottom: 1px solid #E2E2E6;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 13px;
    font-weight: 400;
}

.fable-top-notice--quiet .fable-top-notice-link,
.fable-top-notice--quiet .fable-top-notice-link:hover {
    color: #1A1A1A;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fable-top-notice--quiet .fable-top-notice-link:hover {
    text-decoration-thickness: 2px;
}

/* dve povezavi v vrstici: brez nevidne plasti čez cel trak */
.fable-top-notice--quiet .fable-top-notice-link::after {
    display: none;
}

.fable-top-notice--quiet .fable-top-notice-link:focus-visible {
    outline: 2px solid #1A1A1A;
    outline-offset: 2px;
}

.fable-top-notice--quiet .fable-top-notice-close {
    background: rgba(0, 0, 0, .06);
    color: #4A4A4F;
}

.fable-top-notice--quiet .fable-top-notice-close:hover {
    background: rgba(0, 0, 0, .12);
}

html[data-theme="dark"] .fable-top-notice.fable-top-notice--quiet {
    --fable-notice-bg: #1C1C1E;
    --fable-notice-color: #B8B8BE;
    border-bottom-color: #2C2C2E;
}

html[data-theme="dark"] .fable-top-notice--quiet .fable-top-notice-link {
    color: #F2F2F4;
}

html[data-theme="dark"] .fable-top-notice--quiet .fable-top-notice-close {
    background: rgba(255, 255, 255, .08);
    color: #B8B8BE;
}

@media screen and (max-width: 767px) {
    .fable-top-notice.fable-top-notice--quiet {
        padding-top: 7px;
        padding-bottom: 7px;
        font-size: 12px;
    }
}
