/*
 * Open Sans, the default face, as one family with its two weights. It used to be two families,
 * 'Regular' and 'Bold', and nothing ever named 'Bold': every bold heading was the regular face
 * thickened by the browser while the real bold file sat unused in the precache.
 */
@font-face {
    font-family: 'Open Sans';
    font-weight: 400;
    src: url('assets/fonts/OpenSans-Regular.ttf');
}

@font-face {
    font-family: 'Open Sans';
    font-weight: 700;
    src: url('assets/fonts/OpenSans-Bold.ttf');
}

/* the faces the back office's Font offers (src/theme.js), as the programme ships them; fetched only when chosen */
@font-face {
    font-family: 'Raleway';
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/raleway/Raleway-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Jakarta';
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/plus-jakarta-sans/PlusJakartaSans-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Lexend';
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/lexend/Lexend-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Montserrat';
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/montserrat/Montserrat[wght].ttf') format('truetype');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/poppins/Poppins-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/poppins/Poppins-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Material Icons Outlined';
  font-style: normal;
  font-display: block;
  src: url('assets/fonts/material-symbols.woff2');
  /*src: url(../../fonts/material-icons-outlined.otf);*/
}

:root {
    /*
     * The look's tokens at their defaults: what an event with nothing configured shows. The event's
     * scheme and the configuration override them from #dynamicStyles, an event's own CSS overrides
     * both (src/theme.js). --pv-accent-light and -dark are worked out there from whatever the
     * accent resolves to; these are the default accent's. Same names after the prefix as the
     * programme's --op-, so an organizer meets the same settings on both.
     */
    --pv-bg-page: #f2f2f2;
    --pv-bg-card: #fff;
    --pv-text: #000;
    --pv-text-muted: #666;
    --pv-accent: #30638e;
    --pv-accent-light: rgb(234, 239, 244);
    --pv-accent-dark: #204363;
    --pv-on-accent: #fff;
    --pv-font: 'Open Sans';
    /* text size: a multiplier on the viewport-based root that every rem in this file follows */
    --pv-scale: 1;
    /*
     * Corners, from the one setting. Controls -- the search bar, buttons -- take it as it is, so
     * "pill" makes pills. Boxes and the big panels follow it but are capped: a pill-shaped poster
     * card or information panel would crop what it holds. At the default, .5rem, all three are
     * what they always were.
     */
    --menu-radius: .5rem;
    --pv-radius-box: min(var(--menu-radius), 1rem);
    --pv-radius-panel: min(calc(var(--menu-radius) * 2), 2rem);
    font-family: var(--pv-font), sans-serif;
    font-size: calc(clamp(12px, 1.3vw, 18px) * var(--pv-scale));
    color: var(--pv-text);
    overflow: hidden;
    --poster-aspect-ratio: 1;
    --slide-transition:  transform .3s;
    --zoom-duration: 0;
    touch-action: pan-x pan-y;
}

::-webkit-scrollbar {
    height: 1rem;
    width: 1rem;
}

::-webkit-scrollbar-track {
    background-color: #eeea;
}

::-webkit-scrollbar-thumb {
    background-color: #cccc;
    border-radius: 1rem;
}

i.mi {
  font-family: 'Material Icons Outlined';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  /* color: #5f6368; */
}

i.mi.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

i.mi.off {
    position: relative;
}

i.mi.off:before {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    height: calc(1em * .1);
    width: 65%;
    background-color: #fff;
    border-top: calc(1em * .1) solid #000a;
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    height: 100vh;
    width: 100vw;
    margin: 0;
}

.view {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--pv-bg-card);
}

.view.list {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    min-height: 0;
    z-index: 1;
    --menu-width: 0.3;
    /*
     * The page: its colour, and the configuration's picture over it (--pv-bg-image, from theme.js),
     * covering the whole screen. The filter panel and the list are see-through over it, so it stays
     * put while the list scrolls and shrinks beside the panel.
     */
    background-color: var(--pv-bg-page);
    background-image: var(--pv-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (min-width: 100vh) {
    .view.list {    
        --menu-width: 0.25;
    }
}

.view.detail {
    display: grid;
    place-items: center;
    z-index: 20;
    background-color: transparent;
}

.view.timeout {
    display: grid;
    place-items: center;
    z-index: 50;
}

.view.loading {
    display: grid;
    place-content: center;
    place-items: center;
    align-items: center;
    z-index: 100;
    transition: opacity .2s .2s;
    text-align: center;
    gap: .5rem;
}

.view.loading.status {
    opacity: 0;
    pointer-events: none;
}

.view.loading img {
    width: 5em;
}

.view.loading .status {
    opacity: 0;
    margin-top: 1rem;
}

.view.loading.has-status .status {
    opacity: 1;
    --progress: 0%;
}

.view.loading .progress {
    width: 11rem;
    height: 1rem;
    border-radius: 2rem;
    background-color: #ccc;
    margin-top: 1rem;
}

.view.loading .progress .bar {
    height: 100%;
    background-color: var(--pv-accent);
    border-radius: 2rem;
    width: var(--progress);
    transition: width .1s;
}

.view.popup {
    display: grid;
    place-content: center;
    z-index: 200;
    background-color: #0005;
}

.popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;    
    background-color: var(--pv-bg-card);
    border-radius: var(--pv-radius-panel);
    padding: 2rem 3rem;
    box-shadow: 0 0 2rem #0005;
    font-size: 2rem;
}

.popup .buttons {
    display: flex;
    gap: 1rem;
}

.popup button {
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--menu-radius);
    color: var(--pv-on-accent);
    background-color: var(--pv-accent);
    cursor: pointer;
    font-size: 1.5rem;
}

.popup button:hover {
    background-color: var(--pv-accent-dark);
}

.timeout-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeout-popup-text {
    font-size: 2.3rem;
}

.timeout-popup-timeout {
    width: 100%;
    height: 1rem;
    background: #ccc;
    border-radius: 1rem;
    margin-top: 2rem;
    overflow: hidden;
}

.timeout-popup-timeout .bar {
    display: block;
    height: 100%;
    width: 100%;
    background-color: #aaa;
    transition: width linear;
}

.view.hide, .view.hide * {
    opacity: 0;
    pointer-events: none !important;
}

#filter-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 0 0 calc(100vw * var(--menu-width));
    overflow-y: auto;
    transition: flex .3s;
    overflow: hidden;
    min-width: 0;
    z-index: 1;
    transform: translateX(-100%);
    transition: transform .3s;
}

.view.show-filters #filter-menu {
    transform: translateX(0);
}

#filter-menu #filter-content {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem;
    padding-top: 0;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    /* the bottom fades away under the search bar: faded out rather than painted over, for any page */
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 10rem), transparent calc(100% - 3rem));
    mask-image: linear-gradient(to bottom, #000 calc(100% - 10rem), transparent calc(100% - 3rem));
}

#filter-menu #filter-fields {
    flex: 0 0 auto;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 7rem;
}

#filter-menu #filter-buttons {
    position: absolute;
    bottom: 8rem;
    right: 1rem;
}

#search-container {
    position: absolute;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    transition: opacity .2s;
}

/* body:has(.view.detail:not(.hide)) .view.list #search-container {
    opacity: 0;
} */

#search-menu {
    display: flex;
    position: absolute;
    bottom: 3rem;
    left: -3.5rem;
    right: 1.5rem;
    gap: 1rem;
    height: 4rem;
    align-items: stretch;
    z-index: 100;
    transition: left .3s, transform .2s;
    pointer-events: initial;
}

#search-menu .bt-filter-clear {
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.view.show-filters #search-menu .bt-filter-clear {
    opacity: 1;
    pointer-events: all;
}

.view.show-filters #search-menu {
    left: 1.5rem;
}

#search-menu > * {
    position: relative;
    border-radius: var(--menu-radius);
    box-shadow: 0 .7rem 1.5rem #0009;
    background-color: var(--pv-bg-card);
    overflow: hidden;
}

#search-menu .bt {
    font-size: 2rem;
    display: grid;
    place-content: center;
    width: 4rem;
    cursor: pointer;
}

#search-menu .bt.disabled {
    color: #0004;
    pointer-events: none !important;
    cursor: default;
}

.disable-filters #search-menu .bt-filter {
    display: none;
}

#search-menu .bt-filter .selected {
    position: absolute;
    color: #fff;
    background-color: #888;
    border-bottom-right-radius: 50%;
    width: 1.2rem;
    height: 1.2rem;
    font-size: .75rem;
    opacity: .8;
    display: grid;
    place-content: center;
}

#search-menu .bt-filter .selected:empty {
    display: none;
}

.view.list.show-filters #search-menu .bt-filter {
    background-color: #ddd;
}

#search-menu .bt-filter i:before {
    content: 'filter_alt';
}

#search {
    flex: 1;
    outline: none;
    border: none;
    overflow: hidden;
}

#search input {
    width: 100%;
    height: 100%;
    outline: none;
    border: none;
    font-size: 1.5rem;
    padding: 0 1.5rem;
    padding-right: 3.5rem;
}

#search .clear {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: opacity .1s ease-in-out;
}

#search .clear.hide {
    opacity: 0;
    pointer-events: none;
}

#filter-container {
    display: grid;
}

.filter {
    border-radius: var(--pv-radius-box);
    /* overflow: hidden; */
    contain: paint;
}

/*
 * Sticks with its gap above it, see-through: the group's options clip themselves at the bottom of
 * this title as they scroll up (filter.js clipUnderHeaders), so nothing shows in the gap. Over the
 * options, which the clip puts in a layer of their own that would otherwise paint over the title.
 */
.filter-name {
    padding-top: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* the group header: the collapse control, with the count and this group's clear beside the name */
.filter-name .title {
    display: flex;
    align-items: center;
    padding: .6rem .7rem;
    background-color: #ccc;
    font-weight: bold;
    border-radius: var(--pv-radius-box) var(--pv-radius-box) 0 0;
    cursor: pointer;
    user-select: none;
}

.filter.collapsed .filter-name .title {
    border-radius: var(--pv-radius-box);
}

.filter-name .name {
    flex: 1;
    min-width: 0;
}

/*
 * How many are chosen here, so a collapsed group still shows it is filtering: a fixed circle, so
 * 1 and 12 draw the same shape down the column. As in the programme.
 */
.filter-name .selected-count {
    display: none;
}

.filter.has-selection .filter-name .selected-count {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5em;
    height: 1.5em;
    margin-right: .5rem;
    border-radius: 50%;
    background-color: var(--pv-accent);
    color: var(--pv-on-accent);
    font-size: .8em;
    line-height: 1;
}

.filter-name .group-clear {
    display: none;
    flex-shrink: 0;
    margin-right: .5rem;
    font-size: 1.5rem;
    color: var(--pv-text-muted);
}

.filter.has-selection .filter-name .group-clear {
    display: inline-block;
}

.filter-name .chevron {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: var(--pv-text-muted);
    transition: transform .15s ease;
}

.filter.collapsed .filter-name .chevron {
    transform: rotate(-90deg);
}

/* the group's box, under its header: the gap above the header shows the page (see .filter-name) */
.filter-options {
    background-color: #ddd;
}

.filter.collapsed .filter-options {
    display: none;
}

.filter-option {
    padding: .6rem .7rem;
    cursor: pointer;
    display: flex;
    gap: .3rem;
    align-items: center;
}

.filter-option.selected .label {
    font-weight: bold;
}

.filter-option .check {
    font-size: 1.25rem;
    order: -1;
    margin-right: .3rem;
    margin-top: 0.1rem;
    align-self: start;
}

.filter-option .check:before {
    content: 'square';
}

.filter-option.selected .check:before {
    content: 'check_box';
}

/*
 * Options that would leave no poster, and groups with none left (Filter.availability). Hidden rather
 * than greyed: on a kiosk nobody is there to explain a disabled option.
 */
.filter-option.unavailable,
.filter.unavailable {
    display: none;
}

/* how many posters an option would leave: written always, shown when the configuration asks */
.filter-option .count {
    display: none;
    margin-left: auto;
    padding-left: .5rem;
    align-self: start;
    color: var(--pv-text-muted);
}

.view.list.show-filter-counts .filter-option .count {
    display: inline;
}

#list-content {
    position: absolute;
    inset: 0;
    flex: 1;
    height: 100%;
    align-self: stretch;
    overflow: hidden;
    transform-origin: top right;
    transition: transform .3s, height 0s .3s;
}
.view.list.show-filters #list-content {
    transition: transform .3s, height 0s 0s;
    transform: scale(calc(1 - var(--menu-width)));
    height: calc(100% * (1 / (1 - var(--menu-width)))); 
}

#item-list {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    height: 100%;
}

#item-list #items-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    padding-bottom: 9rem;
}

.view.list.horizontal-poster #item-list #items-container {
    grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
}

@media (min-width: 100vh) {
    #item-list #items-container {
        /* grid-template-columns: repeat(5, 1fr); */
    }
}

#item-list .item {
    display: flex;
    flex-direction: column;
    /* aspect-ratio: 1; */
    /* border: 1px solid #ddd; */
    box-shadow: 0rem .3rem .7rem #0008;
    padding: 0;
    cursor: pointer;
    border-radius: var(--pv-radius-box);
    overflow: hidden;
}

#item-list .item.hide,
#item-list .item.lazy {
    display: none;
}
.item .poster-title {
    height: 3.5rem;
    background-color: var(--pv-accent);
    color: var(--pv-on-accent);
    padding: .5rem;
    z-index: 10;
    order: 2;
    font-size: .85rem;
}

.item .poster-title .text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.item .poster-image {
    width: 100%;
    aspect-ratio: var(--poster-aspect-ratio);
    overflow: hidden;
}

.item .poster-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
}

.item .poster-image img.failed {
    visibility: hidden;
}

/*
 * A website's update notice: it never changes under its reader, so it offers the update instead
 * (updates.js offerUpdate). Over the list only.
 */
.update-notice {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .6rem .6rem .6rem 1.25rem;
    border-radius: var(--menu-radius);
    background-color: var(--pv-bg-card);
    box-shadow: 0 .7rem 1.5rem #0009;
}

.update-notice button {
    border: none;
    padding: .5rem 1rem;
    border-radius: var(--menu-radius);
    color: var(--pv-on-accent);
    background-color: var(--pv-accent);
    font: inherit;
    cursor: pointer;
}

.list-empty {
    position: absolute;
    top: calc(50% - 2rem);
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: 1.5rem;
    color: var(--pv-text-muted);
}

.item:not(.hide) ~ .list-empty {
    display: none;
}


/* Lightbox styles */

.pswp__top-bar {
    display: none;
}

.view.detail .timeout-hides {
    transition: opacity .3s;
}


.view.detail.presentation-mode .timeout-hides:not(.presentation),
.view.detail.hide-controls .timeout-hides {
    opacity: 0;
    pointer-events: none;
}

.lightbox-toolbar {
    --padding-vertical: .3rem;
    position: absolute;
    bottom: 3rem;
    right: unset;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--padding-vertical) 1rem;
    padding-top: 0;
    border-radius: var(--pv-radius-panel);
    background-color: #000c;
    display: flex;
    gap: 2rem;
    color: #fff;
    z-index: 1000000;
}

.lightbox-toolbar .controls {
    display: flex;
    flex-direction: column;
}

.lightbox-toolbar .controls .content {
    flex: 1;
    display: flex;
    align-items: stretch;
    gap: 2rem;
}

.lightbox-toolbar .controls.compact .content {
    gap: 0;
}

.lightbox-toolbar .controls.left-controls {
    margin-right: auto;
}

.lightbox-toolbar .controls.left-controls i {
    font-size: 1.5rem;
}

.lightbox-toolbar .controls .control {
    color: #fff;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 2.5rem;
    font-size: 1.7rem;
    cursor: pointer;
    transition: opacity .15s;
    z-index: 10;
}

.lightbox-toolbar .controls .control i {
    flex: 1;
    display: flex;
    align-items: center;
    padding: var(--padding-vertical) 0;
}

.lightbox-toolbar .controls .label {
    font-size: .75rem;
    text-align: center;
    margin-top: calc(-1 * var(--padding-vertical));
}

.lightbox-toolbar .controls .control.counter {
    white-space: nowrap;
    cursor: default;
    font-size: 1rem;
    align-self: center;
    width: auto;
    margin-left: .5rem;
    transform: translateY(calc(var(--padding-vertical) / 2));
}

.lightbox-toolbar .controls .control.disabled {
    opacity: .5;
    cursor: default;
}

.lightbox-toolbar .controls .control.visibility i {
    font-size: 1.4rem;
}

.abstract-lightbox .lightbox-toolbar {
    bottom: 9rem;
    padding: 0;
}

.abstract-lightbox .lightbox-toolbar.hide {
    display: none;
}

.abstract-lightbox .lightbox-toolbar .controls .content {
    gap: .5rem;
}

.abstract-lightbox .lightbox-toolbar .controls .control.page-counter {
    white-space: nowrap;
    width: auto;
    font-size: 1rem;
    align-self: center;
}

.qr-code {
    position: absolute;
    right: 5.5rem;
    top: 50%;
    transform: translate(calc(100% + 5.5rem), -50%);
    border-radius: var(--pv-radius-panel);
    background-color: #000c;
    width: 16rem;
    transition: transform .2s;
    z-index: 1000000;
    padding: 2rem;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.qr-code .title {
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    color: #fff;
    margin-top: 1rem;
}

.qr-code .code {
    width: 100%;
    aspect-ratio: 1;
}

.qr-code canvas {
    height: 100%;
    width: 100%;
    box-shadow: 0 0 1rem rgba(255,255,255,.5);
}

.view.detail .lightbox-button.presentation {
    top: 1rem;
    left: 1rem;
    width: 5rem;
    height: 5rem;
    transform: none;
    font-size: 1.5rem;
    text-align: center;
}

.view.detail:not(.has-presentation-mode) .lightbox-button.presentation {
    display: none !important;
}

.view.detail .lightbox-button.presentation .text {
    font-size: .75rem;
}

.view.detail .lightbox-button.presentation i {
    position: relative;
    font-size: 2.35rem;
    margin-bottom: -.1rem;
}

.view.detail .lightbox-button.presentation i:before {
    content: 'toggle_off';
}

.view.detail.presentation-mode .lightbox-button.presentation i:before {
    content: 'toggle_on';
}

.view.detail.presentation-mode .lightbox-button.presentation i:after {
    content: '';
    position: absolute;
    display: block;
    background: mediumseagreen;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 40%;
    border-radius: 2rem;
}

.view.detail.show-metadata .qr-code {
    transform: translate(0, -50%);
}

.view.detail .metadata {
    position: absolute;
    left: 5.5rem;
    top: 50%;
    transform: translate(calc(-100% - 5.5rem), -50%);
    border-radius: var(--pv-radius-panel);
    background-color: #000c;
    width: auto;
    transition: transform .2s;
    z-index: 1000000;
    max-width: 33%;
    max-height: calc(100% - 15rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.metadata ::-webkit-scrollbar {
    height: .5rem;
    width: .5rem;
}

.metadata ::-webkit-scrollbar-track {
    background-color: #0000;
}

.metadata ::-webkit-scrollbar-thumb {
    background-color: #ccc6;
    border-radius: 1rem;
}

.view.detail.show-metadata .metadata {
    transform: translate(0, -50%);
}

.view.detail .control.info.off,
.view.detail.show-metadata .control.info {
    display: none !important;
}

.view.detail.show-metadata .control.info.off {
    display: flex !important;
}

.view.detail .metadata .close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    padding: .8rem;
}

.view.detail .metadata .metadata-content {
    gap: .5rem;
    color: #fff;
    font-size: 1rem;
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
}

.view.detail .metadata .data + .data {
    margin-top: 1rem;
}

.view.detail .metadata .data .label {
    font-weight: bold;
}

.abstract-lightbox,
.poster-lightbox {
    position: absolute;
    inset: 0;
    transition: transform .3s;
}

.view.detail.disable-transition .abstract-lightbox,
.view.detail.disable-transition .poster-lightbox {
    transition: none;
}

.abstract-lightbox {
    transform: translateY(100%);
}

.view.detail.show-abstract .abstract-lightbox {
    transform: translateY(0);
}

.view.detail.show-abstract .poster-lightbox {
    transform: translateY(-100%);
}

.view.detail .control.abstract {
    opacity: .5;
    pointer-events: none;
}

.view.detail.has-abstract .control.abstract {
    opacity: initial;
    pointer-events: initial;
}

.view.detail .control.abstract.off,
.view.detail.show-abstract .control.abstract {
    display: none !important;
}

.view.detail.show-abstract .control.abstract.off {
    display: flex !important;
}
.pswp {
    position: absolute;
}

.pswp .pswp__button {
    display: none !important;
}

.pswp img.pswp__img {
    cursor: default;
}

.view.detail.has-slide-transition .pswp .pswp__container {
    transition: var(--slide-transition) !important;
}

.lightbox-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 1rem;
    color: #fff;
    background-color: rgba(0,0,0,.6);
    width: 3.5rem;
    height: 3.5rem;
    z-index: 1000000;
    font-size: 3.5rem;
    border-radius: var(--menu-radius);
    cursor: pointer;
    display: grid !important;
    place-content: center;
}

/* !important to match .lightbox-button's display above; the presenter button is a
   .lightbox-button too and stays */
.view.detail.hide-navigation .lightbox-button:not(.presentation) {
    display: none !important;
}

.lightbox-button.next {
    left: initial;
    right: 1rem;
}

.view.list.show-keyboard #search-menu {
    transform: translateY(-15rem);
}

#search-container #keyboard {
    position: absolute;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

.view.list.show-keyboard #search-container #keyboard {
    /* pointer-events: all; */
}

#keyboard .ui-keyboard {
    position: absolute;
    bottom: 1rem;
    right: auto;
    left: 50%;
    margin: auto;
    top: unset;
    width: auto;
    transform: translate(-50%,18rem);
    transition: transform .2s;
    border-radius: var(--pv-radius-box);
    box-shadow: 0 .7rem 1.5rem #0009;
    background-color: var(--pv-bg-card);
    overflow: hidden;
    pointer-events: initial;
}

#keyboard .ui-keyboard-combo,
#keyboard .ui-keyboard-cancel {
    display: none;
}

#keyboard .ui-keyboard-accept {
    position: absolute;
    right: .25rem;
}

.view.list.show-keyboard #keyboard .ui-keyboard {
    transform: translate(-50%, 0);
}

#keyboard .ui-keyboard-button,
.admin-keyboard .ui-keyboard-button {
    height: 2.7rem;
    min-width: 2.7rem;
    margin: .2rem;
    cursor: pointer;
    overflow: hidden;
    line-height: 2rem;
    font-size: 1.25rem;
    border: none;
    box-shadow: .1rem .1rem .1rem #0002;
    border-radius: .3rem;
    /* a button does not inherit the page's font on its own */
    font-family: var(--pv-font), sans-serif;
}

#keyboard .ui-keyboard-enter,
#keyboard .ui-keyboard-tab {
    opacity: .5;
    pointer-events: none;
}

/* the admin popup: a status table a technician reads across a room, the raw state under Details */
.admin-popup-content {
    width: min(46rem, 85vw);
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 1.15rem;
}

.admin-status {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 2rem;
    row-gap: .4rem;
    margin-bottom: 1.25rem;
}

.admin-section {
    grid-column: 1 / -1;
    margin-top: 1rem;
    color: #888;
    font-size: .8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.admin-row {
    display: contents;
}

.admin-row-label {
    color: #666;
}

.admin-row-value {
    overflow-wrap: anywhere;
}

.admin-row-value[data-state="ok"] {
    color: #2e7d32;
}

.admin-row-value[data-state="warn"] {
    color: #c25e00;
}

.admin-row-value[data-state="info"] {
    color: var(--pv-accent);
}

.popup .admin-row-value button.admin-inline {
    margin-left: 1rem;
    padding: .3rem .9rem;
    font-size: 1rem;
}

.popup .admin-row-value button.admin-inline:disabled {
    opacity: .5;
}

/* the screen's name, typed in the popup with its own keyboard under the table (admin.js showNameRow) */
.popup .admin-name-input {
    width: min(20rem, 60%);
    padding: .3rem .6rem;
    font: inherit;
    font-size: 1rem;
    border: 1px solid #bbb;
    border-radius: .3rem;
}

/* under the name row, across both columns; nothing while it is closed */
.admin-keyboard {
    grid-column: 1 / -1;
}

.admin-keyboard:empty {
    display: none;
}

.admin-keyboard .ui-keyboard {
    position: static;
    width: fit-content;
    max-width: 100%;
    margin: .4rem auto .6rem;
    border-radius: var(--pv-radius-box);
    background-color: #e8e8e8;
}

/*
 * Keys, not the popup's buttons -- .popup button would give each one its padding and colour, which
 * made a row twice the popup's width -- and smaller than the search box's, so a full row fits.
 */
.popup .admin-keyboard .ui-keyboard-button {
    height: 2.3rem;
    min-width: 2.2rem;
    margin: .12rem;
    padding: 0 .35rem;
    line-height: 1.8rem;
    font-size: 1rem;
    color: #222;
    background-color: #fff;
    border-radius: .3rem;
}

.popup .admin-keyboard .ui-keyboard-button:hover {
    background-color: #f0f0f0;
}

/* the accept key saves: the one key in the popup's colour */
.popup .admin-keyboard .ui-keyboard-accept,
.popup .admin-keyboard .ui-keyboard-accept:hover {
    color: var(--pv-on-accent);
    background-color: var(--pv-accent);
}

.admin-popup-field.config summary {
    cursor: pointer;
    color: #666;
}

.admin-popup-content .admin-popup-field.config textarea {
    width: 100%;
    margin-top: .75rem;
    outline: none;
}

.admin-popup-field {
    position: relative;
}

.admin-popup-field i.copy {
    position: absolute;
    top: 2.75rem;
    right: 1rem;
    color: silver;
    font-size: 1.5rem;
    cursor: pointer;
    padding: .5rem;
    border-radius: .4rem;
    background-color: #fff;
}

.admin-popup-label {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: .5rem;
}

.pswp__zoom-wrap.panning {
    transition: transform calc(var(--zoom-duration) * 1ms) !important;
}

#vanilla-toast-container {
    top: 0;
    bottom: initial;
    z-index: 1000;
}

#vanilla-toast {
    font-size: 1.25rem;
    margin: 2rem;
}

#vanilla-toast.info {
    background-color: rgba(0,0,0,.6);
}
/*
 * Phones: any screen narrower than a TV ever is, which in practice is website mode's visitors. By
 * width rather than by mode, so a kiosk never reaches it and a website on a desktop keeps the screen's
 * layout. Pinch zooms and drags pan on a phone, so their buttons go; the information panel becomes a
 * sheet from the bottom; the filters a drawer over the list rather than a column beside a shrunken
 * one; and the QR code goes -- the visitor is already holding the phone it would open.
 */
@media (max-width: 700px) {
    :root {
        /* the viewport-based root bottoms out at 12px, which puts card titles near 10px */
        font-size: calc(15px * var(--pv-scale));
    }

    /*
     * Over the list -- its cards' title bars sit at z-index 10 -- and under the search bar. It covers
     * the list, so it carries the page itself, over the same box: the picture lines up with the one
     * behind it.
     */
    #filter-menu {
        position: absolute;
        inset: 0;
        flex: none;
        z-index: 50;
        background-color: var(--pv-bg-page);
        background-image: var(--pv-bg-image, none);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .view.list.show-filters #list-content {
        transform: none;
        height: 100%;
    }

    .view.detail .metadata {
        left: .75rem;
        right: .75rem;
        top: auto;
        bottom: 6.5rem;
        max-width: none;
        max-height: 55vh;
        transform: translateY(calc(100% + 7rem));
    }

    .view.detail.show-metadata .metadata {
        transform: translateY(0);
    }

    .qr-code {
        display: none;
    }

    .lightbox-toolbar .pan-controls,
    .lightbox-toolbar .zoom-controls,
    .lightbox-toolbar .controls:has(.control.visibility) {
        display: none;
    }

    .lightbox-toolbar {
        bottom: 1rem;
        gap: 1.25rem;
        max-width: calc(100vw - 1.5rem);
    }

    .lightbox-button {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 2.5rem;
        left: .5rem;
    }

    .lightbox-button.next {
        left: initial;
        right: .5rem;
    }

    /* the arrows would sit on the sheet; a swipe moves between posters meanwhile */
    .view.detail.show-metadata .lightbox-button.previous,
    .view.detail.show-metadata .lightbox-button.next {
        visibility: hidden;
    }
}
