/* ==UserStyle==
@name           Amazon responsive + customizations
@version        1.0.0
@description    Amazon websites are more suitable for wide screens.
@author         BreatFR (https://breat.fr)
@namespace      https://gitlab.com/breatfr
@homepageURL    https://gitlab.com/breatfr/amazon
@supportURL     https://discord.gg/Q8KSHzdBxs
@license        AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
@preprocessor   stylus

@var    text        separator1              "️🌐 General 🌐"              "_"
@var    text        fontsize                "Custom font size"          1.2rem
@var    checkbox    hidescrollbars          "Hide scrollbars"           1
@var    checkbox    widemode                "Wide mode"                 1

@var    text        separator2              "🎮 Prime Gaming 🎮"        "_"
@var    checkbox    hideduplicatecontent    "Hide duplicate content"    1

@var    text        separator3              "🎦 Prime Video 🎦"         "_"
@var    checkbox    showprimecontent        "Show only Prime content"   1
@downloadURL https://update.greasyfork.org/scripts/549723/Amazon%20responsive%20%2B%20customizations.user.css
@updateURL https://update.greasyfork.org/scripts/549723/Amazon%20responsive%20%2B%20customizations.meta.css
==/UserStyle== */

/* === Credits ===
Website         https://breat.fr
facebook        https://www.facebook.com/breatfroff
mastodon        https://mastodon.social/@breat_fr
telegram        https://t.me/breatfr
vk              https://vk.com/breatfroff
X (twitter)     https://x.com/breatfroff
=== Credits === */

@-moz-document regexp("^https://www.amazon\\..*") {
    /* General */    
    [data-a-expander-name="review_text_read_more"] > div > span,
    .cr-original-review-content {
        font-size: 1.2rem !important;
        line-height: 1.5 !important;
    }
    
    img,
    video {
        border-radius: 1em;
    }
    
    if hidescrollbars {
        *,
        :root ::-webkit-scrollbar {
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
            -moz-overflow-style: none !important;
            -webkit-overflow-style: none !important;
        }
        ::-webkit-scrollbar {
            display: none;
            width: 0;
        }
    }
    
    if widemode {
        #dp,
        #gc-balance-table,
        #gw-content-grid,
        #yourOrders,
        #yourOrdersContent,
        [data-cel-widget="aplus"] > div > div,
        .a-fixed-right-grid-col > div,
        .g-fix-wide-screen,
        .gw-card-layout,
        .navFooterMoreOnAmazon,
        .no-subs-page,
        .wls-no-results-box,
        .ya-personalized,
        .your-orders-content-container[style="width:920px;"],
        .your-orders-content-container[style="width: 920px;"],
        .your-orders-content-container__content {
            max-width: 100% !important;
            width: 100% !important;
        }
        .ya-card-cell {
            width: 33% !important;
        }
        .aplus-v2 .aplus-standard .apm-spacing img {
            height: auto !important;
            width: 100% !important;
        }
        .navFooterMoreOnAmazon {
            display: inline-flex;
            justify-content: space-evenly;
        }
        .right-rail {
            display: none !important;
            pointer-events: none !important;
        }
    }
}

@-moz-document regexp("https?://www\\.amazon\\.[^/]+/message-us.*$") {
    /* Message Us */
    div,
    span,
    textarea,
    ::placeholder {
        font-size: 1.2rem !important;
        line-height: 1.5 !important;
    }
}

@-moz-document domain("gaming.amazon.com") {
    /* Prime Gaming */
    if hideduplicatecontent {
        .featured-content,
        .home > div:nth-of-type(2) > div:first-child,
        .offer-list__divider,
        [data-a-target="MarketingPromotionBannerSectionRootHome"],
        [data-a-target="offer-filter-button-Luna"],
        [data-a-target="offer-section-FGWP"],
        [data-a-target="offer-section-LUNA"],
        [data-a-target="offer-section-WEB_GAMES"],
        [data-a-target="SubCreditBannerSectionRootHome"] {
            display: none !important;
            height: 0 !important;
            width: 0 !important;
        }
    }
    
    if hidescrollbars {
        *,
        :root ::-webkit-scrollbar {
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
            -moz-overflow-style: none !important;
            -webkit-overflow-style: none !important;
        }
        ::-webkit-scrollbar {
            display: none;
            width: 0;
        }
    }
    
    if widemode {
        #root > div > div > nav > div > div > div,
        #root > div > div > nav > div > div > div > div,
        #SearchBar,
        .offer-list__content,
        .section-container,
        .standalone-carousel__wrapper {
            max-width: 100%;
        }
    }
}

@-moz-document domain("primevideo.com") {
    /* Prime Video */
    if hidescrollbars {
        *,
        :root ::-webkit-scrollbar {
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
            -moz-overflow-style: none !important;
            -webkit-overflow-style: none !important;
        }
        ::-webkit-scrollbar {
            display: none;
            width: 0;
        }
    }
    
    if showprimecontent {
        [data-testid="channel-overflow-container"],
        li:has(svg.NbhXwl) {
            display: none;
        }
    }
}

@-moz-document url-prefix("https://www.primevideo.com/search/") {
    /* Prime Video Search */
    if showprimecontent {
        article:has(svg.NbhXwl) {
            display: none;
        }
    }
}
@-moz-document url-prefix("https://www.primevideo.com/detail/") {
    /* Prime Video detail */
    .dv-node-dp-details-metdatablock * {
        font-size: 1.2rem !important;
        line-height: 1.5 !important;
    }

    if showprimecontent {
        #tab-content-episodes > div > ol > li,
        #tab-content-episodes > div > ol > li > div > div:nth-of-type(5) > div > div {
            max-width: 100%;
        }
    }
}
