.infinitepanels-wrapper,
.infinitepanels-viewport {
    width: 100%;
    max-width: 100%;
}

.infinitepanels-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.infinitepanels-viewport::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.infinitepanels-panes {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    width: max-content;
    max-width: none;
    padding-right: 1rem;
}

.infinitepanels-pane {
    flex: 1 1 auto;
    min-width: 0;
}

/* Keep Simpl's desktop page column the same width as an InfinitePanels pane. */
@media (min-width: 1200px) {
    #dokuwiki__site:has(> #dokuwiki__top.mode_show) {
        width: var(--infinitepanels-panel-width, 50rem);
    }

    /* The single-page width rule above has higher specificity than the
       generic active-layout rule below. Expand the site once panes are open
       so the viewport can show multiple fixed-width pages side by side. */
    body.infinitepanels-active #dokuwiki__site:has(> #dokuwiki__top.mode_show) {
        width: 100vw;
        max-width: none;
    }
}

body.infinitepanels-active #dokuwiki__site {
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
}

.infinitepanels-active #dokuwiki__content,
.infinitepanels-active #dokuwiki__content > .pad.group,
.infinitepanels-active .infinitepanels-wrapper,
.infinitepanels-active .infinitepanels-viewport {
    width: 100%;
    max-width: none !important;
}

.infinitepanels-active .infinitepanels-panes {
    align-items: stretch;
}

.infinitepanels-active .infinitepanels-pane {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: var(--infinitepanels-panel-width, 50rem);
}

.infinitepanels-active .infinitepanels-pane > .pad.group {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
}

.infinitepanels-active .infinitepanels-pane .page.group {
    max-width: none !important;
}

.infinitepanels-active .infinitepanels-pane .topBanner {
    top: 0;
}

body.infinitepanels-ready #dokuwiki__pagetools {
    display: none;
}

.dokuwiki a.wikilink1.infinitepanels-open-page-link,
.dokuwiki a.wikilink2.infinitepanels-open-page-link {
    background-color: palegreen;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

html[data-theme="dark"] .dokuwiki a.wikilink1.infinitepanels-open-page-link,
html[data-theme="dark"] .dokuwiki a.wikilink2.infinitepanels-open-page-link {
    background-color: #355b4a;
}


.infinitepanels-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
}

.infinitepanels-header-right {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
}

.infinitepanels-pane-toolbar {
    position: sticky;
    top: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid currentColor;
    background: Canvas;
}

.infinitepanels-pane-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.infinitepanels-actions button,
.infinitepanels-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent !important;
    cursor: pointer;
    color: inherit;
    font: inherit;
    line-height: 1.2;
    padding: 0 3px;
}

.infinitepanels-actions a {
    text-decoration: none;
}

.infinitepanels-actions svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
}

.infinitepanels-actions svg.phosphor-duotone {
    fill: currentColor;
    stroke: none;
}

.infinitepanels-actions button:hover,
.infinitepanels-actions a:hover {
    background: white !important;
    background-color: white !important;
    color: black !important;
}

body.infinitepanels-active .infinitepanels-actions button:hover,
body.infinitepanels-active .infinitepanels-actions a:hover {
    background: white !important;
    background-color: white !important;
    color: black !important;
}

.infinitepanels-error {
    padding: 1rem;
}

:root {
    --simpl-imagepop-z-index: 13000;
}

.infinitepanels-pane-placeholder {
    flex: 0 0 auto;
    width: var(--infinitepanels-panel-width, 50rem);
    min-width: 0;
    visibility: hidden;
}

.infinitepanels-zoom-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 2rem;
    background: rgb(0 0 0 / 55%);
}

body.infinitepanels-zoom-active > div.plugin-preview {
    z-index: 10001;
}

body.infinitepanels-zoom-active > div.pp_overlay {
    z-index: 10001 !important;
}

body.infinitepanels-zoom-active > div.pp_pic_holder {
    z-index: 10002 !important;
}

.infinitepanels-zoom-backdrop .infinitepanels-pane {
    flex: 0 1 var(--infinitepanels-zoom-width, 100rem);
    width: var(--infinitepanels-zoom-width, 100rem);
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    overflow: auto;
}

.infinitepanels-zoom-backdrop > .infinitepanels-single-page-zoom {
    flex: 0 1 var(--infinitepanels-zoom-width, 100rem);
    width: var(--infinitepanels-zoom-width, 100rem);
    max-width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-sizing: border-box;
}

.infinitepanels-zoom-backdrop > .infinitepanels-single-page-zoom .page.group {
    max-width: none !important;
}

.infinitepanels-zoom-backdrop > .infinitepanels-single-page-zoom .topBanner {
    top: 0;
}

.infinitepanels-zoom-backdrop .infinitepanels-popup-pane {
    flex-basis: var(--infinitepanels-panel-width, 50rem);
    width: var(--infinitepanels-panel-width, 50rem);
}

.infinitepanels-popup-pane .page-breadcrumbs {
    display: none;
}

.infinitepanels-popup-pane .topBanner {
    display: none;
}

.infinitepanels-edit-backdrop {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 2rem;
    background: rgb(0 0 0 / 55%);
}

.infinitepanels-edit-window {
    display: flex;
    flex-direction: column;
    width: 92vw;
    max-width: 1200px;
    height: 92vh;
    max-height: 92vh;
    border: 1px solid #000;
    background: #fff;
    box-shadow: 0 0 1.5rem rgb(0 0 0 / 35%);
}

.infinitepanels-edit-toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 2.5rem;
    padding: 0 0.75rem;
    border-bottom: 1px solid #000;
    color: #111;
    background: #fff;
    font-weight: 600;
}

.infinitepanels-edit-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.infinitepanels-edit-toolbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.infinitepanels-edit-toolbar-action:hover,
.infinitepanels-edit-toolbar-action:focus-visible {
    color: #fff;
    background: #000;
    outline: none;
}

.infinitepanels-edit-toolbar-action svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.infinitepanels-edit-new-tab {
    text-decoration: none;
}

.infinitepanels-edit-frame {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

body.infinitepanels-active .infinitepanels-zoom-backdrop .infinitepanels-pane {
    flex: 0 1 var(--infinitepanels-zoom-width, 100rem);
    width: var(--infinitepanels-zoom-width, 100rem);
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    overflow: auto;
}

body.infinitepanels-active .infinitepanels-zoom-backdrop .infinitepanels-popup-pane {
    flex: 0 1 var(--infinitepanels-panel-width, 50rem);
    width: var(--infinitepanels-panel-width, 50rem);
}

@media (min-width: 1200px) {
    html:has(body.infinitepanels-active) {
        overflow: clip;
    }

    body.infinitepanels-active {
        height: 100vh;
        overflow: clip;
    }

    body.infinitepanels-active .infinitepanels-viewport {
        height: var(--infinitepanels-viewport-height);
    }

    body.infinitepanels-active .infinitepanels-panes {
        height: 100%;
    }

    body.infinitepanels-active .infinitepanels-pane {
        height: 100%;
        max-height: 100%;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    body.infinitepanels-active .infinitepanels-pane::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}
