/*
|-------------------------------------------------------------------------------
| Sub-Header
|-------------------------------------------------------------------------------
The bar of page buttons under the main header on the order, load, availability
and tab layout pages (O3G-476).

It sticks to the top of .main-content-wrapper, the page's scroll container,
and stays in the page flow, so the content always starts right below its real
height whatever it holds or however wide the screen is. Don't give it a fixed
position or push the content down by a hard-coded amount: sub-headers differ in
height from page to page and at each width.
*/

.sub-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 845; /*Must be between 840 (Content-Wrapper) and 850 (Sidebar)*/
    font-size: 1.25rem;
    color: #444;
    pointer-events: none;
    border-bottom: 1px solid #d2d6d3;
}

.sub-header {
    background-color: #f9fafc;
    pointer-events: initial;
}

.sub-header a {
    display: inline-block;
}

.sub-header a, .sub-header .button-link {
    color: #444;
    background: transparent;
    border: none;
    padding: 5px;
    line-height: 20px;
}

.sub-header a:hover, .sub-header .button-link:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

@media (min-width: 512px) {
    .sub-header-wrapper {
        font-size: 1.5rem;
    }
    .sub-header a, .sub-header .button-link {
        padding: 10px;
    }
}

@media (min-width: 640px) {
    .sub-header-wrapper {
        font-size: 1.75rem;
    }
}

@media (min-width: 992px) {
    body.sidebar-collapse .sub-header-wrapper {
        font-size: 2.0rem;
    }
    body.sidebar-collapse .sub-header a,
    body.sidebar-collapse .sub-header .button-link {
        padding: 15px 10px;
    }
}

@media (min-width: 1200px) {
    .sub-header-wrapper {
        font-size: 2.0rem;
    }
    .sub-header a, .sub-header .button-link {
        padding: 15px 10px;
    }
}

/* Dark mode (O3G-519): under any skin-X-dark class, using dark-mode.css's palette */
:is(.skin-blue-dark, .skin-black-dark, .skin-purple-dark, .skin-yellow-dark, .skin-red-dark, .skin-green-dark) .sub-header {
    color: var(--dark-text);
    background-color: var(--dark-page);
}

:is(.skin-blue-dark, .skin-black-dark, .skin-purple-dark, .skin-yellow-dark, .skin-red-dark, .skin-green-dark) .sub-header a,
:is(.skin-blue-dark, .skin-black-dark, .skin-purple-dark, .skin-yellow-dark, .skin-red-dark, .skin-green-dark) .sub-header .button-link {
    color: var(--dark-text);
}
:is(.skin-blue-dark, .skin-black-dark, .skin-purple-dark, .skin-yellow-dark, .skin-red-dark, .skin-green-dark) .sub-header a:hover,
:is(.skin-blue-dark, .skin-black-dark, .skin-purple-dark, .skin-yellow-dark, .skin-red-dark, .skin-green-dark) .sub-header .button-link:hover {
    color: var(--dark-text);
    background: rgba(255, 255, 255, 0.1);
}
