/*
 * Intranet Wiśniewo — tryb wydajności dla Firefox.
 *
 * Firefox gorzej radzi sobie z wieloma nakładającymi się warstwami:
 * backdrop-filter, dużymi rozmyciami, fixed-position oraz animacją
 * wielkich elementów Aurora. Chromium zwykle kompozytuje je płynniej.
 */

html.pw-firefox body.pw-modern .pw-ambient-orb {
    animation: none !important;
    filter: blur(28px) !important;
    opacity: .42 !important;
    will-change: auto !important;
    transform: none !important;
}

html.pw-firefox body.pw-modern .pw-ambient-orb:nth-child(3),
html.pw-firefox body.pw-modern .pw-ambient-orb:nth-child(4) {
    display: none !important;
}

html.pw-firefox body.pw-modern .pw-ambient-bg::after {
    opacity: .12 !important;
}

/* Najcięższe, stale widoczne warstwy */
html.pw-firefox body.pw-modern .im-online-panel,
html.pw-firefox body.pw-modern .im-drawer,
html.pw-firefox body.pw-modern .im-chat-window,
html.pw-firefox body.pw-modern .im-drawer-overlay,
html.pw-firefox body.pw-modern .im-toast,
html.pw-firefox body.pw-modern .pw-dock,
html.pw-firefox body.pw-modern .announcement-topbar,
html.pw-firefox body.pw-modern .intranet-container > header,
html.pw-firefox body.pw-modern > header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Zachowujemy wygląd szkła przez bardziej kryjące tło */
html.pw-firefox body.pw-modern .im-online-panel,
html.pw-firefox body.pw-modern .im-drawer,
html.pw-firefox body.pw-modern .im-chat-window,
html.pw-firefox body.pw-modern .im-toast,
html.pw-firefox body.pw-modern .pw-dock,
html.pw-firefox body.pw-modern .announcement-topbar,
html.pw-firefox body.pw-modern .intranet-container > header,
html.pw-firefox body.pw-modern > header {
    background: rgba(248, 250, 255, .96) !important;
}

html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .im-online-panel,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .im-drawer,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .im-chat-window,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .im-toast,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .pw-dock,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .announcement-topbar,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .intranet-container > header,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern > header {
    background: rgba(19, 28, 46, .97) !important;
}

/* Redukcja kosztownych cieni na stale przyklejonych elementach */
html.pw-firefox body.pw-modern .im-online-panel,
html.pw-firefox body.pw-modern .im-drawer,
html.pw-firefox body.pw-modern .im-chat-window,
html.pw-firefox body.pw-modern .pw-dock {
    box-shadow: 0 12px 30px rgba(24, 38, 70, .16) !important;
    contain: layout paint style;
}

/* Brak kosztownych transformacji na wielu elementach podczas hover */
html.pw-firefox body.pw-modern .feed-post:hover,
html.pw-firefox body.pw-modern .pw-dock a:hover,
html.pw-firefox body.pw-modern .announcement-list-item:hover,
html.pw-firefox body.pw-modern .im-contact:hover,
html.pw-firefox body.pw-modern .im-conversation:hover {
    transform: none !important;
}

/* Ograniczamy przejścia i animacje interfejsu czatu */
html.pw-firefox body.pw-modern .im-online-panel,
html.pw-firefox body.pw-modern .im-drawer,
html.pw-firefox body.pw-modern .im-chat-window,
html.pw-firefox body.pw-modern .im-drawer-overlay,
html.pw-firefox body.pw-modern .im-message,
html.pw-firefox body.pw-modern .im-toast {
    transition-duration: .08s !important;
}

/* Firefox ma mniej pracy przy przewijaniu rozmowy */
html.pw-firefox body.pw-modern .im-chat-messages,
html.pw-firefox body.pw-modern .im-drawer-list,
html.pw-firefox body.pw-modern .im-online-list {
    scrollbar-width: thin;
    overscroll-behavior: contain;
    contain: layout paint;
}

/* Karty nadal wyglądają nowocześnie, ale nie rozmywają tła w czasie scrolla */
html.pw-firefox body.pw-modern .feed-post,
html.pw-firefox body.pw-modern .pw-feed-heading,
html.pw-firefox body.pw-modern .sidebar .card,
html.pw-firefox body.pw-modern aside .card,
html.pw-firefox body.pw-modern .announcement-composer,
html.pw-firefox body.pw-modern .announcement-library {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.pw-firefox body.pw-modern .feed-post,
html.pw-firefox body.pw-modern .pw-feed-heading,
html.pw-firefox body.pw-modern .sidebar .card,
html.pw-firefox body.pw-modern aside .card,
html.pw-firefox body.pw-modern .announcement-composer,
html.pw-firefox body.pw-modern .announcement-library {
    background-color: rgba(250, 252, 255, .93) !important;
}

html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .feed-post,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .pw-feed-heading,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .sidebar .card,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern aside .card,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .announcement-composer,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .announcement-library {
    background-color: rgba(21, 31, 50, .95) !important;
}
