/**
 * Service workspace docks: the floating bar the Reddit Comments (rcth), Reddit Posts (rpth) and
 * Reddit Upvotes (single-page-order) plugins print in the footer of their landing, history,
 * checkout and wallet views. One skin for all three, the "split capsule" picked on 2026-10-29:
 *
 * - below 1200px: a solid white capsule with the order button first and wide, and the other items
 *   as icon-over-label tools (phones hide Main page and Edit request, as the plugins already do);
 * - from 1200px: the plugins' left icon rail keeps its geometry and takes the same colours;
 * - Need Help sits above the bar below 1200px and drops under it while "Services" is open.
 *
 * Every selector covers all three plugin prefixes, so the docks cannot drift apart. Never set
 * `display` on the nav links: the plugins and homepage-marketing.css hide items with it.
 * Labels are shortened in includes/class-redaccs-workspace-dock.php.
 */

/* ---------- Shared: solid surface, neutral items, menu ---------- */

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav, .rpth-post-workspace-nav, .reddit-upvotes-workspace-nav) {
    border: 1px solid oklch(0.91 0 0);
    background: #fff;
    box-shadow: 0 12px 32px -10px oklch(0.2 0 0 / 0.22), 0 2px 6px oklch(0.2 0 0 / 0.06);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link) {
    border-color: transparent;
    background: transparent;
    color: oklch(0.36 0 0);
    transition: background-color 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link):is(:hover, :focus),
body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu):is(:hover, :focus-within) > :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link) {
    border-color: transparent;
    background: oklch(0.955 0 0);
    color: oklch(0.18 0 0);
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link):focus-visible {
    outline: 2px solid oklch(0.18 0 0);
    outline-offset: 2px;
}

/* Current page: orange tint, the only colour on a tool. */
body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-active,
body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-active:is(:hover, :focus) {
    border-color: transparent;
    background: oklch(0.955 0.028 40);
    color: oklch(0.47 0.17 35);
}

/* The order button: the one solid orange item. */
body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-action,
body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-action.is-active {
    border-color: oklch(0.53 0.19 35);
    background: oklch(0.53 0.19 35);
    color: #fff;
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-action:is(:hover, :focus),
body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-action.is-active:is(:hover, :focus) {
    border-color: oklch(0.47 0.18 35);
    background: oklch(0.47 0.18 35);
    color: #fff;
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-submenu, .rpth-post-workspace-submenu, .reddit-upvotes-workspace-submenu) {
    padding: 6px;
    border: 1px solid oklch(0.91 0 0);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 44px -14px oklch(0.2 0 0 / 0.3), 0 2px 6px oklch(0.2 0 0 / 0.06);
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-submenu-link, .rpth-post-workspace-submenu-link, .reddit-upvotes-workspace-submenu-link) {
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: oklch(0.18 0 0);
    font-size: 14.5px;
    font-weight: 560;
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-submenu-link, .rpth-post-workspace-submenu-link, .reddit-upvotes-workspace-submenu-link):is(:hover, :focus) {
    background: oklch(0.955 0 0);
    color: oklch(0.18 0 0);
}

body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-submenu-link, .rpth-post-workspace-submenu-link, .reddit-upvotes-workspace-submenu-link) :is(.rcth-comment-workspace-nav-icon, .rpth-post-workspace-nav-icon, .reddit-upvotes-workspace-nav-icon) {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    color: oklch(0.5 0 0);
}

/* ---------- Below 1200px: split capsule ---------- */

@media (max-width: 1199px) {
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav, .rpth-post-workspace-nav, .reddit-upvotes-workspace-nav) {
        padding: 6px;
        border-radius: 22px;
        overflow: visible;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) {
        display: flex;
        align-items: stretch;
        gap: 2px;
        min-width: 0;
    }

    /* Tools: icon over a one-line label. */
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link) {
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 100%;
        min-width: 0;
        min-height: 54px;
        padding: 0 4px;
        border-radius: 14px;
        font-size: 10.5px;
        font-weight: 600;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) > :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link),
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) > :is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu) {
        flex: 0 0 58px;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link) :is(.rcth-comment-workspace-nav-icon, .rpth-post-workspace-nav-icon, .reddit-upvotes-workspace-nav-icon) {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    /* The order button leads and takes the spare width, icon and label on one line. */
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) > :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-action {
        order: -1;
        flex: 1 1 auto;
        flex-direction: row;
        gap: 8px;
        margin-right: 4px;
        padding: 0 14px;
        border-radius: 16px;
        font-size: 15px;
        font-weight: 650;
        letter-spacing: -0.005em;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) > :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-action :is(.rcth-comment-workspace-nav-icon, .rpth-post-workspace-nav-icon, .reddit-upvotes-workspace-nav-icon) {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
        stroke-width: 2.4;
    }

    /* "Services" opens upward from the capsule's right edge, so it never leaves the screen. */
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu) {
        position: static;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu) > :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link) {
        height: 100%;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-submenu, .rpth-post-workspace-submenu, .reddit-upvotes-workspace-submenu) {
        top: auto;
        right: 0;
        bottom: calc(100% + 10px);
        left: auto;
        width: auto;
        min-width: 236px;
        transform: translateY(6px);
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu):is(:hover, :focus-within) :is(.rcth-comment-workspace-submenu, .rpth-post-workspace-submenu, .reddit-upvotes-workspace-submenu) {
        transform: none;
    }

    /* Keeps the hover alive across the 10px gap between the capsule and the menu. */
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-submenu, .rpth-post-workspace-submenu, .reddit-upvotes-workspace-submenu)::after {
        content: "";
        position: absolute;
        inset: 100% 0 auto;
        height: 12px;
    }

    /* Need Help clears the capsule, and drops under it while "Services" is open. */
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) .redaccs-chatbot-placeholder {
        bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active):has(:is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu):hover, :is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu):focus-within) .redaccs-chatbot-placeholder {
        z-index: 80;
    }
}

/* Tablet: the capsule hugs its items, centred, with every item showing. */
@media (min-width: 768px) and (max-width: 1199px) {
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav, .rpth-post-workspace-nav, .reddit-upvotes-workspace-nav) {
        width: auto;
        max-width: min(100%, 720px);
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) > :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link),
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) > :is(.rcth-comment-workspace-nav-menu, .rpth-post-workspace-nav-menu, .reddit-upvotes-workspace-nav-menu) {
        flex: 0 0 auto;
        width: auto;
        min-width: 66px;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link) {
        padding: 0 10px;
        font-size: 11px;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-list, .rpth-post-workspace-nav-list, .reddit-upvotes-workspace-nav-list) > :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link).is-action {
        flex: 0 0 auto;
        padding: 0 20px;
    }
}

/* Phone: full width minus the gutters. */
@media (max-width: 767px) {
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) {
        inset-inline: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav, .rpth-post-workspace-nav, .reddit-upvotes-workspace-nav) {
        width: 100%;
        max-width: 100%;
    }
}

/* ---------- From 1200px: the icon rail, same colours ---------- */

@media (min-width: 1200px) {
    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav, .rpth-post-workspace-nav, .reddit-upvotes-workspace-nav) {
        border-radius: 22px;
    }

    body:is(.rcth-comment-workspace-active, .rpth-post-workspace-active, .reddit-upvotes-workspace-active) :is(.rcth-comment-workspace-footer-bar, .rpth-post-workspace-footer-bar, .reddit-upvotes-workspace-footer-bar) :is(.rcth-comment-workspace-nav-link, .rpth-post-workspace-nav-link, .reddit-upvotes-workspace-nav-link) {
        border-radius: 14px;
    }
}

/* ---------- Buy Reddit Upvotes landing: no dock (lane E, #32, 2026-10-29) ----------
 * The rebuilt landing sends every buyer to upvote.net, so the Reddit Upvotes dock (a second
 * checkout on redaccs at another price) is hidden there, and only there:
 * - single-page-order adds `reddit-upvotes-workspace-landing` only when the request path is exactly
 *   /buy-reddit-upvotes/ (history, checkout and wallet get -history, -checkout, -wallet instead);
 * - the loader adds `rbp-page` to page 11205721 only once it holds the rebuilt content (the rbu-s00
 *   guard), so the old page keeps its dock until the cutover.
 * Hides the bar itself (never a nav link), drops the plugin's body padding for the bar (88px, 112px on
 * phones) and puts Need Help back on redaccs-chatbot.css's own offsets (24px; 16px up to 640px).
 * With the dock gone, homepage-marketing.css's landing History-link rule has nothing to act on.
 */
body.rbp-page.reddit-upvotes-workspace-landing .reddit-upvotes-workspace-footer-bar {
    display: none;
}

body.rbp-page.reddit-upvotes-workspace-landing {
    padding-bottom: 0;
}

body.rbp-page.reddit-upvotes-workspace-landing .redaccs-chatbot-placeholder {
    bottom: 24px;
}

@media (max-width: 640px) {
    body.rbp-page.reddit-upvotes-workspace-landing .redaccs-chatbot-placeholder {
        bottom: 16px;
    }
}
