.page-discovery > .discovery-header {
    display: flex;
    flex-direction: row;
    line-height: 1.2;
    position: sticky;
    top: -2px;
    z-index: 100;
    padding: 22px calc(210px + var(--discovery-page-padding-right)) 7px var(--discovery-page-padding-left);
    padding: 22px calc(var(--discovery-page-padding-right) + 6px + max(42px * 3, var(--discovery-nav-width, 0px))) 7px var(--discovery-page-padding-left);
    margin: 0 calc(-1 * var(--discovery-page-padding-right)) 18px calc(-1 * var(--discovery-page-padding-left));
    background-color: rgba(255, 255, 255, .92);
    transition: background-color .25s ease-in;
}
.discovery-root-darkmode .page-discovery > .discovery-header {
    background-color: rgba(36, 36, 36, .92);
}
.page-discovery.page_overscrolled > .discovery-header {
    box-shadow: 0 0 3px rgba(0, 0, 0, .2);
    transition-property: background-color, box-shadow;
}
.discovery-root-darkmode .page-discovery.page_overscrolled > .discovery-header {
    box-shadow: 0 0 3px rgba(0, 0, 0, .5);
}
@supports (backdrop-filter: blur(5px)) or (-webkit-backdrop-filter: blur(5px)) {
    .page-discovery > .discovery-header {
        background-color: rgba(255, 255, 255, .8);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
    }
    .discovery-root-darkmode .page-discovery > .discovery-header {
        background-color: rgba(36, 36, 36, .8);
    }
}

/********************************
* Header text
********************************/

.page-discovery > .discovery-header .discovery-header-text {
    flex: 1;
    position: relative;
    font-size: 220%;
}
.page-discovery > .discovery-header .discovery-header-text::before {
    content: attr(data-title);
    white-space: pre;
}
.page-discovery > .discovery-header .discovery-header-text:focus-within:before {
    visibility: hidden;
}
.page-discovery > .discovery-header .discovery-header-text input {
    font: inherit;
    color: inherit;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: -1px;
    padding: 0;
    opacity: .0001;
    border: 1px solid #aaa;
    border-color: transparent transparent #aaa transparent;
    background-color: transparent;
    transition: box-shadow .15s ease-out;
}
.page-discovery > .discovery-header .discovery-header-text input:hover,
.page-discovery > .discovery-header .discovery-header-text input:focus {
    opacity: 1;
}
.page-discovery > .discovery-header .discovery-header-text input:focus {
    border-bottom-color: #0af;
    box-shadow: 0 3px 0 0 rgba(0, 170, 255, .2) !important;
    outline: 0;
}
.page-discovery > .discovery-header .discovery-header-text .timestamp {
    display: block;
    font-size: 10px;
    color: rgba(153, 153, 153, 0.5);
    margin-top: 4px;
}

/********************************
* Actions
********************************/

.page-discovery > .discovery-actions {
    position: sticky;
    top: 34px;
    transition: top .25s;
    z-index: 101;
    display: flex;
    justify-content: flex-end;
    margin-top: 19px;
    margin-bottom: -61px;
    pointer-events: none;
}
.page-discovery > .discovery-actions button {
    width: 42px;
    height: 42px;
    background: center no-repeat;
    border-radius: 5px;
    border: none;
    text-indent: -500px;
    overflow: hidden;
    cursor: pointer;
    opacity: .5;
    outline: none;
    pointer-events: auto;
}
.page-discovery > .discovery-actions button.discovery-view-popup-active,
.page-discovery > .discovery-actions button:hover,
.page-discovery > .discovery-actions button:focus {
    background-color: rgba(0, 0, 0, .03125);
    opacity: 1;
}
.page-discovery > .discovery-actions button.toggle-fullscreen {
    background-image: url(./img/fullscreen-on.svg);
    background-size: 25px;
}
.page-discovery > .discovery-actions button.edit-mode {
    background-image: url(./img/edit.svg);
    background-size: 20px;
}
.page-discovery > .discovery-actions button.edit-mode:not(.disabled) {
    opacity: 1;
}
.page-discovery > .discovery-actions button.edit-mode.disabled {
    filter: grayscale();
}
.page-discovery > .discovery-actions button.share {
    background-image: url(./img/share.svg);
    background-size: 25px;
}

/********************************
* Dzen mode
********************************/

.discovery[data-dzen] .page-discovery > .discovery-actions {
    top: 20px;
}
.discovery[data-dzen] .page-discovery > .discovery-actions button.toggle-fullscreen {
    background-image: url(./img/fullscreen-off.svg);
}
