/*
 * e-Wiśniewo — Firefox Ultra Lite 2.8
 *
 * Tryb ładuje się wyłącznie w Firefox (klasa html.pw-firefox).
 * Chromium/Brave/Edge zachowują pełny wygląd.
 */

html.pw-firefox {
    scroll-behavior: auto !important;
}

/* Całkowite wyłączenie kosztownych animacji i przejść tylko w Firefox. */
html.pw-firefox body.pw-modern *,
html.pw-firefox body.pw-modern *::before,
html.pw-firefox body.pw-modern *::after {
    animation: none !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
    will-change: auto !important;
}

/* Wyłączenie wszystkich rozmyć i filtrów kompozytora. */
html.pw-firefox body.pw-modern *,
html.pw-firefox body.pw-modern *::before,
html.pw-firefox body.pw-modern *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Tło Aurora zostaje zastąpione lekkim gradientem statycznym. */
html.pw-firefox body.pw-modern .pw-ambient-bg,
html.pw-firefox body.pw-modern .pw-ambient-orb,
html.pw-firefox body.pw-modern .pw-ambient-bg::before,
html.pw-firefox body.pw-modern .pw-ambient-bg::after {
    display: none !important;
}

html.pw-firefox body.pw-modern {
    background:
        radial-gradient(circle at 12% 8%, rgba(65, 115, 255, .10), transparent 30%),
        radial-gradient(circle at 88% 15%, rgba(139, 92, 246, .08), transparent 27%),
        #eef3fb !important;
    background-attachment: scroll !important;
}

html.pw-firefox[data-pw-resolved="dark"] body.pw-modern {
    background:
        radial-gradient(circle at 12% 8%, rgba(65, 115, 255, .09), transparent 30%),
        radial-gradient(circle at 88% 15%, rgba(139, 92, 246, .07), transparent 27%),
        #111a2b !important;
}

/* Stałe, nieprzezroczyste tła zamiast szkła. */
html.pw-firefox body.pw-modern .feed-post,
html.pw-firefox body.pw-modern .pw-feed-heading,
html.pw-firefox body.pw-modern .card,
html.pw-firefox body.pw-modern article,
html.pw-firefox body.pw-modern .announcement-composer,
html.pw-firefox body.pw-modern .announcement-library,
html.pw-firefox body.pw-modern .announcement-list-item,
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 header,
html.pw-firefox body.pw-modern .announcement-topbar {
    background-image: none !important;
    background-color: rgba(250, 252, 255, .98) !important;
    box-shadow: 0 6px 20px rgba(24, 38, 70, .10) !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 .card,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern article,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .announcement-composer,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .announcement-library,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .announcement-list-item,
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 header,
html.pw-firefox[data-pw-resolved="dark"] body.pw-modern .announcement-topbar {
    background-color: rgba(20, 30, 49, .99) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .20) !important;
}

/* Brak transformacji i kosztownych efektów hover. */
html.pw-firefox body.pw-modern .feed-post:hover,
html.pw-firefox body.pw-modern .card:hover,
html.pw-firefox body.pw-modern .announcement-list-item:hover,
html.pw-firefox body.pw-modern .pw-dock a:hover,
html.pw-firefox body.pw-modern .im-contact:hover,
html.pw-firefox body.pw-modern .im-conversation:hover,
html.pw-firefox body.pw-modern button:hover {
    transform: none !important;
    filter: none !important;
}

/* Elementy poza ekranem mogą być renderowane dopiero przy przewijaniu. */
@supports (content-visibility: auto) {
    html.pw-firefox body.pw-modern main .feed-post,
    html.pw-firefox body.pw-modern main .card,
    html.pw-firefox body.pw-modern main article,
    html.pw-firefox body.pw-modern main .announcement-list-item {
        content-visibility: auto;
        contain-intrinsic-size: 260px;
    }
}

/* Izolacja obszarów czatu ogranicza ponowne malowanie całej strony. */
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-chat-messages,
html.pw-firefox body.pw-modern .im-drawer-list,
html.pw-firefox body.pw-modern .im-online-list,
html.pw-firefox body.pw-modern .pw-dock {
    contain: layout paint style;
}

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 {
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

/* Obrazy nie wykonują dodatkowych filtrów. */
html.pw-firefox body.pw-modern img {
    filter: none !important;
}

/* Panel online jest prostszy wizualnie, ale zachowuje pełną funkcjonalność. */
html.pw-firefox body.pw-modern .im-online-panel {
    border-radius: 17px !important;
}

html.pw-firefox body.pw-modern .im-chat-window {
    border-radius: 17px !important;
}

/* Ograniczenie kosztu dużego cienia docka. */
html.pw-firefox body.pw-modern .pw-dock {
    box-shadow: 0 5px 17px rgba(25, 40, 75, .12) !important;
}
