/* Pleasy Sticky Header: wyłącznie zachowanie sticky, bez przebudowy wyglądu. */
:root {
    --psh-admin-offset: 0px;
    --psh-top-row-height: 0px;
    --psh-z: 99990;
}

html:has(#wpadminbar) {
    --psh-admin-offset: 32px;
}

.psh-sticky-root {
    position: sticky !important;
    top: var(--psh-admin-offset) !important;
    z-index: var(--psh-z) !important;
}

.psh-sticky-root.psh-has-shadow,
.psh-stack-menu.psh-has-shadow {
    box-shadow: 0 10px 28px rgba(24, 18, 22, .055) !important;
}

.psh-stack-top {
    position: sticky !important;
    top: var(--psh-admin-offset) !important;
    z-index: var(--psh-z) !important;
}

.psh-stack-menu {
    position: sticky !important;
    top: calc(var(--psh-admin-offset) + var(--psh-top-row-height)) !important;
    z-index: calc(var(--psh-z) - 1) !important;
}

/* Jeżeli Elementor wcześniej robił sticky wyłącznie dla menu, neutralizujemy to
   tylko na elemencie, którym zarządza ten plugin. */
.psh-managed-child.elementor-sticky--active,
.psh-managed-child.elementor-sticky--effects,
.psh-managed-child.e-sticky,
.psh-managed-child.e-sticky--active {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
}

.psh-debug-root {
    outline: 3px solid #f24e7f !important;
    outline-offset: -3px !important;
}

.psh-debug-top {
    outline: 2px dashed #1f8f5f !important;
    outline-offset: -2px !important;
}

.psh-debug-menu {
    outline: 2px dashed #5b5bf7 !important;
    outline-offset: -2px !important;
}

.psh-debug-badge {
    position: fixed;
    z-index: 1000000;
    right: 12px;
    bottom: 12px;
    max-width: min(440px, calc(100% - 24px));
    padding: 10px 13px;
    border-radius: 10px;
    background: #181216;
    color: #fff;
    font: 600 12px/1.4 system-ui, sans-serif;
    box-shadow: 0 12px 30px rgba(0,0,0,.2);
}

@media (max-width: 782px) {
    html:has(#wpadminbar) {
        --psh-admin-offset: 46px;
    }
}
