/*
 * Public website themes - base shared by every theme: drawers, overlays, search panel, back to top,
 * preloader, and the adjustments GRID / plugin pages need when a theme header and footer wrap them.
 * Themes style the look in theme/{slug}/css; this file only holds mechanics. Loaded as "shared:css/public-theme.css".
 */

.pt-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pt-skip {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 10000;
    padding: 8px 14px;
    background: #000;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.pt-skip:focus {
    top: 8px;
    color: #fff;
}

/* drawers (mobile menu, sidebar) */
[data-pt-drawer] {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1060;
    width: var(--pt-drawer-width, 320px);
    max-width: 88vw;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    transition: transform .32s ease, visibility .32s;
    visibility: hidden;
}

[data-pt-drawer].pt-drawer-right {
    left: auto;
    right: 0;
    transform: translateX(105%);
}

[data-pt-drawer].is-open {
    transform: none;
    visibility: visible;
}

[data-pt-overlay] {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}

[data-pt-overlay].is-open {
    opacity: 1;
    visibility: visible;
}

/* GRID scrolls inside .scrollable-page (html and body are 100% high, overflow hidden);
   themed public pages scroll the document like a normal website */
html.pt-on {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

html.pt-on body:not(.modal-open) {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
}

html.pt-on.pt-drawer-open,
html.pt-on.pt-drawer-open body {
    overflow: hidden !important;
}

/* search panel */
[data-pt-search] {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1070;
    transform: translateY(-105%);
    transition: transform .3s ease, visibility .3s;
    visibility: hidden;
}

[data-pt-search].is-open {
    transform: none;
    visibility: visible;
}

/* back to top */
[data-pt-backtotop] {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    cursor: pointer;
}

[data-pt-backtotop].is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* preloader */
[data-pt-preloader] {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .35s ease, visibility .35s;
}

[data-pt-preloader].is-done {
    opacity: 0;
    visibility: hidden;
}

/* menus: desktop dropdowns open on hover/focus, mobile ones with [data-pt-submenu-toggle] */
.pt-menu,
.pt-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    .pt-menu-desktop [data-pt-submenu-item] {
        position: relative;
    }

    .pt-menu-desktop [data-pt-submenu-item] > .pt-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
        z-index: 30;
    }

    .pt-menu-desktop [data-pt-submenu-item]:hover > .pt-submenu,
    .pt-menu-desktop [data-pt-submenu-item]:focus-within > .pt-submenu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

.pt-menu-mobile [data-pt-submenu-item] > .pt-submenu {
    display: none;
}

.pt-menu-mobile [data-pt-submenu-item].is-open > .pt-submenu {
    display: block;
}

/* ------------------------------------------------------------------
 * GRID pages inside a theme
 * ------------------------------------------------------------------ */

/* theme layout for Template::render() public pages (theme/{slug}/views/layout/index.php) */
.pt-main {
    min-height: 50vh;
}

.pt-main .public-page-container,
.pt-main .page-container {
    padding-top: 0 !important;
    height: auto !important;
}

.pt-main .scrollable-page,
.pt-main .main-scrollable-page {
    height: auto !important;
    overflow: visible !important;
}

.pt-main #page-content.page-wrapper {
    padding-top: 30px;
    padding-bottom: 40px;
}

/* full documents wrapped by the theme (sign in, sign up, plugin layouts) */
html.pt-on body.pt-wrapped > .public-navbar,
html.pt-on body.pt-wrapped > nav.public-navbar {
    display: none !important;
}

html.pt-on body.pt-wrapped .scrollable-page > .footer {
    display: none !important;
}

html.pt-on body.signin-page.pt-wrapped .scrollable-page,
html.pt-on body.signup-page.pt-wrapped .scrollable-page {
    height: auto !important;
    margin-top: 0 !important;
    overflow: visible !important;
}

html.pt-on body.signin-page.pt-wrapped .form-signin,
html.pt-on body.signup-page.pt-wrapped .form-signin {
    height: auto !important;
    margin-top: 48px;
    margin-bottom: 48px;
}

html.pt-on body.signin-page.pt-wrapped,
html.pt-on body.signup-page.pt-wrapped {
    background-image: none !important;
}

html.pt-on body.signin-page.pt-wrapped .ps__rail-y,
html.pt-on body.signup-page.pt-wrapped .ps__rail-y {
    display: none !important;
}

/* plugin pages: the theme footer replaces the plugin footer when the theme option says so */
html.pt-on.pt-hide-plugin-footers .pt-wrapped .about-footer,
html.pt-on.pt-hide-plugin-footers .pt-wrapped .blog-footer,
html.pt-on.pt-hide-plugin-footers .pt-wrapped .gal-footer,
html.pt-on.pt-hide-plugin-footers .pt-wrapped .give-footer,
html.pt-on.pt-hide-plugin-footers .pt-wrapped .bfw-footer,
html.pt-on.pt-hide-plugin-footers .pt-wrapped .shop-footer,
html.pt-on.pt-hide-plugin-footers .pt-wrapped .c-foot {
    display: none !important;
}

/* plugin headers become a section bar under the theme header (never sticky on top of it) */
html.pt-on .pt-wrapped .about-header,
html.pt-on .pt-wrapped .blog-header,
html.pt-on .pt-wrapped .gal-header,
html.pt-on .pt-wrapped .give-header,
html.pt-on .pt-wrapped .shop-header,
html.pt-on .pt-wrapped .c-head {
    position: relative !important;
    top: auto !important;
}

@media print {
    [data-pt-drawer],
    [data-pt-overlay],
    [data-pt-search],
    [data-pt-backtotop],
    .pt-site-header,
    .pt-site-footer {
        display: none !important;
    }
}
