/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 * ┃ ██████ ██████ ██████       █      █      █      █      █ █▄  ▀███ █       ┃
 * ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█  ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄  ▀█ █ ▀▀▀▀▀ ┃
 * ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄   █ ▄▄▄▄▄ ┃
 * ┃ █      ██████ █  ▀█▄       █ ██████      █      ███▌▐███ ███████▄ █       ┃
 * ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
 * ┃ Copyright (c) 2017, the Perspective Authors.                              ┃
 * ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
 * ┃ This file is part of the Perspective library, distributed under the terms ┃
 * ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
 * ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
 */

::slotted(.workspace-master-widget) {
    --psp-status-bar--display: none;
    --psp-label--config-button--content: var(
        --open-settings-button--content,
        "\1F527"
    ) !important;
}

.workspace-master-widget[settings] {
    --psp-label--config-button--content: var(
        --close-settings-button--content,
        "\1F527"
    ) !important;
}

:not(.workspace-master-widget).widget-maximize {
    --psp-label--config-button--content: var(
        --open-settings-button--content,
        "\1F527"
    ) !important;
}

:not(.workspace-master-widget).widget-maximize[settings] {
    --psp-label--config-button--content: var(
        --close-settings-button--content,
        "\1F527"
    ) !important;
}

.lm-DockPanel-widget {
    border: 1px solid #eaeaea;
    border-width: 0px !important;
    min-width: 300px;
    min-height: 200px;
}

:not.workspace-master-widget {
    --psp-label--config-button--content: "" !important;
}

.context-menu > perspective-viewer.context-focus {
    opacity: 1;
    filter: none;
}

.context-menu > perspective-viewer {
    filter: saturate(0);

    & > * {
        pointer-events: none;
    }
}

:host {
    --psp-icon--bookmarks--mask-image: url("../svg/bookmark-icon.svg");
}

::slotted(perspective-viewer) {
    flex: 1;
    position: relative;
    display: block;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: visible !important;
    --psp-close-button--display: flex;
}

::slotted(perspective-viewer.bookmarks-container:not([settings])) {
    --psp-icon--status-ok--mask-image: var(
        --psp-icon--bookmarks--mask-image
    ) !important;
    --psp-status-icon--ok--border-color: var(--psp-inactive--color);
    --psp-status-icon--ok-hover--border-color: var(--psp--color);
    --psp-status-icon--ok-hover--background-color: var(--psp--color);
    --psp-status-icon--ok-hover--color: var(--psp--background-color);
    --psp-status-icon--ok--cursor: pointer;
    --psp-status-icon--pointer-events: all;
}

::slotted(perspective-viewer::part(status-indicator)) {
    background-color: red;
    border: 1px solid red;
}

::slotted(perspective-viewer:not(.widget-maximize)) {
    --psp-status-bar--padding: 0 36px 0 8px;
}

:host-context(.lm-mod-override-cursor) {
    cursor: grabbing !important;
}

:host-context(.lm-mod-override-cursor) ::slotted(perspective-viewer),
.context-menu ::slotted(perspective-viewer) {
    --override-content-pointer-events: none;
}
