/* Keep each control's resting palette; share the v5.1 sweep and chevron. */
body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(
    .product_count_total .btn_action, .gtt-home-recs-more,
    [data-gtt-desc-toggle], #loadmore-comment, #loadProductInStock,
    .xem_them_desc_btn, .gtt-product-category-link,
    .recent_posts .bottom_action > a, .viewd-product-action > a, .gtt-more-fx
) {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
    --gtt-more-hover: #226da0;
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(.product_count_total .btn_action, .gtt-home-recs-more) {
    --gtt-more-rest-bg: #96d2ee;
    --gtt-more-rest-fg: #fff;
}

body.wp-theme-shopping [data-gtt-desc-toggle] {
    --gtt-more-rest-bg: #fff;
    --gtt-more-rest-fg: #226da0;
}

body.wp-theme-maxstore [data-gtt-desc-toggle] {
    --gtt-more-rest-bg: #f0f0f0;
    --gtt-more-rest-fg: #515151;
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-product-category-link {
    --gtt-more-rest-bg: #eff7fd;
    --gtt-more-rest-fg: #194f78;
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(
    .product_count_total .btn_action, .gtt-home-recs-more,
    [data-gtt-desc-toggle], #loadmore-comment, #loadProductInStock,
    .xem_them_desc_btn, .gtt-product-category-link,
    .recent_posts .bottom_action > a, .viewd-product-action > a, .gtt-more-fx
)::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -1px;
    border: 0;
    border-radius: inherit;
    background: var(--gtt-more-hover, #226da0);
    transform: translateX(-101%);
    transition: transform 420ms cubic-bezier(.24, .82, .25, 1);
    pointer-events: none;
}

/* Hide the old circle/triangle while retaining its space in the count cards. */
body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(
    .product_count_total .btn_action .arrow, .gtt-home-recs-more .gtt-home-recs-arrow
) {
    visibility: hidden !important;
    animation: none !important;
    transition: none !important;
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(
    .product_count_total .btn_action .arrow, .gtt-home-recs-more .gtt-home-recs-arrow
)::before {
    content: none !important;
    border: 0 !important;
    transform: none !important;
    transition: none !important;
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(
    .product_count_total .view_all, .gtt-home-recs-more-label, .gtt-more-label
)::after,
body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(
    [data-gtt-desc-toggle], #loadmore-comment, #loadProductInStock,
    .xem_them_desc_btn, .gtt-product-category-link,
    .recent_posts .bottom_action > a, .viewd-product-action > a,
    .gtt-more-fx:not(.gtt-more-fx--tile)
)::after {
    content: '›' / '';
    display: inline-block;
    width: 12px;
    margin-left: 12px;
    color: inherit;
    font: 400 22px/0 Arial, sans-serif;
    text-align: center;
    vertical-align: -1px;
    transform: none !important;
    transition: none !important;
    pointer-events: none;
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) :is(
    [data-gtt-desc-toggle], #loadmore-comment, .xem_them_desc_btn,
    .gtt-more-fx:not(.gtt-more-fx--tile)
) :is(.caret, .fa-angle-down, .fa-angle-up, .fa-angle-left, .fa-angle-right, .fa-chevron-down, .fa-chevron-up, .fa-chevron-left, .fa-chevron-right, .fa-caret-down, .fa-caret-up, .fa-caret-left, .fa-caret-right) {
    display: none !important;
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx {
    transition: color 220ms ease, border-color 300ms ease;
}

@media (hover: hover) and (pointer: fine) {
    body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx:not(:disabled, [aria-disabled="true"]):hover {
        background-color: var(--gtt-more-rest-bg, transparent) !important;
        color: #fff !important;
        border-color: var(--gtt-more-hover, #226da0);
    }
    body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx:not(:disabled, [aria-disabled="true"]):hover::before {
        transform: translateX(0) !important;
    }
    body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx:hover :where(span, p, strong, b, i) {
        color: inherit !important;
    }
}

body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx:not(:disabled, [aria-disabled="true"]):focus-visible {
    background-color: var(--gtt-more-rest-bg, transparent) !important;
    color: #fff !important;
    outline: 2px solid #55acee;
    outline-offset: 2px;
}
body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx:not(:disabled, [aria-disabled="true"]):focus-visible::before {
    transform: translateX(0) !important;
}
body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx:focus-visible :where(span, p, strong, b, i) {
    color: inherit !important;
}

@media (prefers-reduced-motion: reduce) {
    body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx,
    body:is(.wp-theme-shopping, .wp-theme-maxstore) .gtt-more-fx::before {
        transition: none !important;
    }
}
