@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("plus-jakarta-sans-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

.pc-papafy-notice,
.pc-papafy-notice * {
    box-sizing: border-box;
}

.pc-papafy-notice {
    --notice-background: #0e0e0f;
    --notice-border: 0;
    --notice-text-shadow: 1px 6px 6px rgba(131, 106, 107, 0.57);
    --notice-pill-background: linear-gradient(#0e0e0f, #0e0e0f) padding-box, linear-gradient(90deg, #624bff 0%, #b829ea 35%, #ff4fa8 65%, #ff9e3b 100%) border-box;
    --notice-pill-shadow: 0 0 18px rgba(255, 79, 168, 0.28);
    --notice-cta-background: #fd397a;
    --notice-cta-text: #ffffff;

    align-items: center;
    background: var(--notice-background);
    border-bottom: var(--notice-border);
    box-shadow: none;
    color: #ffffff;
    display: flex;
    flex-wrap: wrap;
    font-family: "Plus Jakarta Sans", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 27px;
    font-weight: 400;
    gap: 10px 14px;
    justify-content: center;
    left: 0;
    letter-spacing: normal;
    line-height: 1;
    min-height: 0;
    min-width: 0;
    opacity: 1;
    padding: 15px max(44px, env(safe-area-inset-right, 0px)) 15px max(10px, env(safe-area-inset-left, 0px));
    pointer-events: none;
    position: fixed;
    right: 0;
    text-align: center;
    text-decoration: none;
    text-shadow: var(--notice-text-shadow);
    text-transform: none;
    top: 0;
    transform: translateY(0);
    transition: transform 0.28s cubic-bezier(.22, 1, .36, 1), opacity 0.24s ease;
    visibility: visible;
    will-change: transform, opacity;
    z-index: 5000;
}

body.dark-mode .pc-papafy-notice,
html[data-theme="dark"] .pc-papafy-notice {
    --notice-background: #2f2f2f;
    --notice-border: 1px solid #424242;
    --notice-text-shadow: none;
    --notice-pill-background: linear-gradient(#3a3a3a, #3a3a3a) padding-box, linear-gradient(#41454d, #41454d) border-box;
    --notice-pill-shadow: none;
    --notice-cta-background: #ef4986;
    --notice-cta-text: #111214;
}

/* Keep Loobek's global dark-mode text overrides outside the notice. */
body.dark-mode .pc-papafy-notice,
body.dark-mode .pc-papafy-notice :is(a, span, b, button) {
    color: #ffffff !important;
}

body.dark-mode .pc-papafy-notice .sitewide-notice__cta {
    color: var(--notice-cta-text) !important;
}

.pc-papafy-notice[hidden] {
    display: none !important;
}

.pc-papafy-notice .pc-papafy-notice__link,
.pc-papafy-notice .pc-papafy-notice__link:hover,
.pc-papafy-notice .pc-papafy-notice__link:focus-visible {
    align-items: center;
    color: #ffffff;
    display: inline-flex;
    flex-wrap: wrap;
    font: inherit;
    gap: inherit;
    justify-content: center;
    letter-spacing: inherit;
    max-width: 100%;
    min-width: 0;
    pointer-events: auto;
    text-align: center;
    text-decoration: none;
    text-transform: none;
}

.pc-papafy-notice .sitewide-notice__text {
    display: block;
    max-width: min(1180px, calc(100vw - 32px));
    overflow-wrap: anywhere;
}

.pc-papafy-notice .sitewide-notice__text b {
    font-weight: 700;
}

.pc-papafy-notice .sitewide-notice__promo-pill {
    align-items: center;
    background: var(--notice-pill-background);
    border: 2px solid transparent;
    border-radius: 999px;
    box-shadow: var(--notice-pill-shadow);
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 900;
    justify-content: center;
    letter-spacing: normal;
    line-height: 1;
    min-height: 34px;
    padding: 0 14px;
    text-shadow: none;
    white-space: nowrap;
}

.pc-papafy-notice .sitewide-notice__cta {
    align-items: center;
    background: var(--notice-cta-background);
    border: 1px solid var(--notice-cta-background);
    border-radius: 4px;
    color: var(--notice-cta-text);
    display: inline-flex;
    font-size: 16px;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 34px;
    padding: 0 14px;
    text-shadow: none;
    white-space: nowrap;
}

.pc-papafy-notice .pc-papafy-notice__dismiss {
    all: unset;
    background: transparent;
    border: 0;
    border-radius: 4px;
    box-sizing: border-box;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-size: 26px;
    height: 36px;
    line-height: 1;
    padding: 0;
    pointer-events: auto;
    position: absolute;
    right: max(4px, env(safe-area-inset-right, 0px));
    text-align: center;
    text-shadow: none;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
}

.pc-papafy-notice :is(.pc-papafy-notice__dismiss, .pc-papafy-notice__link):focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.pc-papafy-notice[data-hidden="true"] {
    opacity: 0;
    transform: translateY(calc(-100% - 8px));
}

.pc-papafy-notice[data-hidden="true"] :is(.pc-papafy-notice__link, .pc-papafy-notice__dismiss) {
    pointer-events: none;
}

.pc-papafy-notice-spacer {
    height: var(--sitewide-notice-height, 0px);
}

/* Loobek sets an inline top while its storefront header is fixed. */
html[data-pc-papafy-notice-offset] .sticky-wrapper > .header-sticky.is-sticky {
    top: var(--sitewide-notice-offset, 0px) !important;
}

body.admin-bar .pc-papafy-notice {
    top: var(--wp-admin--admin-bar--height, 32px);
}

html[data-pc-papafy-notice-offset] body.admin-bar .sticky-wrapper > .header-sticky.is-sticky {
    top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--sitewide-notice-offset, 0px)) !important;
}

@media (max-width: 600px) {
    .pc-papafy-notice {
        font-size: 15px;
        gap: 8px;
        padding: 10px max(40px, env(safe-area-inset-right, 0px)) 10px max(10px, env(safe-area-inset-left, 0px));
    }

    .pc-papafy-notice .sitewide-notice__text {
        max-width: calc(100vw - 24px);
    }

    .pc-papafy-notice .sitewide-notice__promo-pill {
        font-size: 11px;
        min-height: 27px;
        padding: 0 10px;
    }

    .pc-papafy-notice .sitewide-notice__cta {
        font-size: 13px;
        min-height: 28px;
        padding: 0 10px;
    }
}
