/* Generic kiosk player chrome (pairing, slides, menu, locale). Map styles: assets/player/map.css */

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #f4f4f4;
    font-family: system-ui, -apple-system, sans-serif;
    overflow: hidden;
    -webkit-touch-callout: none;
}

#player-root {
    position: relative;
    width: 100%;
    height: 100%;
}

.screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 2rem;
}

.screen-black {
    background: #000;
}

/* Empty = bundled SentioLab mark, not CMS. Blue sampled from the logo PNG. */
.screen-empty {
    background: #1974cc;
}

.screen-empty img {
    display: block;
    max-width: min(70vw, 48rem);
    max-height: min(36vh, 18rem);
    width: auto;
    height: auto;
}

.screen--pairing {
    justify-content: flex-start;
    padding-top: clamp(2rem, 8vh, 4rem);
    padding-bottom: calc(var(--vk-height, 0px) + 1rem);
    box-sizing: border-box;
}

.pairing-code {
    font-size: clamp(2rem, 6.5vw, 4rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    width: min(96vw, 42rem);
    max-width: 100%;
    padding: 0.4em 0.35em;
    box-sizing: border-box;
    border: 0;
    border-bottom: 3px solid #f4f4f4;
    background: transparent;
    color: #f4f4f4;
    outline: none;
    cursor: default;
}

.pairing-label {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.pairing-error {
    color: #ff8a8a;
    margin-top: 1rem;
    min-height: 1.4em;
}

.pending-label {
    max-width: min(90vw, 28rem);
    font-size: clamp(1.15rem, 3.2vw, 1.7rem);
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-align: center;
    opacity: 0.9;
}

.pending-totem {
    margin-top: 0.75rem;
    text-align: center;
    opacity: 0.6;
}

.playback-host {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

/* Slajd nad mapą gdy obie warstwy chwilowo są w DOM (animacja / odzysk po bugu). */
.playback-host > .map-layer {
    z-index: 1;
}

.playback-host > .slide-layer {
    z-index: 10;
}

.slide-layer {
    position: absolute;
    inset: 0;
}

.slide-layer > img,
.slide-layer > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-article {
    position: absolute;
    inset: 8%;
    z-index: 2;
    overflow: hidden;
    font-size: clamp(1.2rem, 3vw, 2.4rem);
    line-height: 1.35;
}

.slide-article::after {
    display: block;
    clear: both;
    content: '';
}

.slide-article .article-media {
    position: relative;
    inset: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.slide-article .article-media--left {
    float: left;
    margin: 0 0.6em 0.4em 0;
}

.slide-article .article-media--right {
    float: right;
    margin: 0 0 0.4em 0.6em;
}

.slide-article .article-media--block {
    display: block;
    float: none;
    clear: both;
    margin: 0.5em auto;
}

.slide-article .article-media--framed {
    box-sizing: border-box;
    padding: 0.4em;
    background: #f4f1ea;
    border: 1px solid rgba(40, 36, 28, 0.35);
    box-shadow: 0 0.12em 0.45em rgba(0, 0, 0, 0.28);
}

.slide-box {
    position: absolute;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0.4em;
    font-size: clamp(1rem, 2.4vw, 2rem);
}

.slide-in {
    animation: slide-left-in 500ms ease-out forwards;
}

.slide-out {
    animation: slide-left-out 500ms ease-out forwards;
}

@keyframes slide-left-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slide-left-out {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/*
 * Totem chrome tabs: label contrast on arbitrary slide brightness (glass tabs are semi-transparent).
 * --player-* scale/opacity from player-map-chrome.js (payload.player).
 */
#player-root {
    --player-chrome-shadow-inactive:
        0 0 1px rgba(0, 0, 0, 0.95),
        0 0 5px rgba(0, 0, 0, 0.72),
        0 1px 2px rgba(0, 0, 0, 0.92),
        1px 0 1px rgba(0, 0, 0, 0.65),
        -1px 0 1px rgba(0, 0, 0, 0.65),
        0 -1px 1px rgba(0, 0, 0, 0.55);
    --player-chrome-shadow-active:
        0 0 1px rgba(255, 255, 255, 0.95),
        0 0 5px rgba(255, 255, 255, 0.75),
        0 1px 2px rgba(255, 255, 255, 0.9),
        1px 0 1px rgba(255, 255, 255, 0.65),
        -1px 0 1px rgba(255, 255, 255, 0.65);
}

.locale-item:not(.is-active),
.search-tab:not(.is-active),
.menu-item:not(.is-active) {
    -webkit-text-stroke: 0.025em rgba(0, 0, 0, 0.42);
    paint-order: stroke fill;
    text-shadow: var(--player-chrome-shadow-inactive);
}

.locale-item:not(.is-active) .bi,
.search-tab:not(.is-active) .bi,
.menu-item:not(.is-active) .bi {
    -webkit-text-stroke: 0.03em rgba(0, 0, 0, 0.45);
    paint-order: stroke fill;
    text-shadow: var(--player-chrome-shadow-inactive);
}

.locale-item.is-active,
.search-tab.is-active,
.menu-item.is-active {
    -webkit-text-stroke: 0.025em rgba(255, 255, 255, 0.55);
    paint-order: stroke fill;
    text-shadow: var(--player-chrome-shadow-active);
}

.locale-item.is-active .bi,
.search-tab.is-active .bi,
.menu-item.is-active .bi {
    -webkit-text-stroke: 0.03em rgba(255, 255, 255, 0.5);
    paint-order: stroke fill;
    text-shadow: var(--player-chrome-shadow-active);
}

.menu-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    gap: calc(0.45rem * var(--player-menu-bar-scale, 1));
    justify-content: center;
    padding: 0 calc(0.9rem * var(--player-menu-bar-scale, 1));
    pointer-events: none;
}

.menu-item {
    appearance: none;
    pointer-events: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: calc(0.35rem * var(--player-menu-bar-scale, 1));
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: calc(3.4rem * var(--player-menu-bar-scale, 1));
    max-width: calc(10.5rem * var(--player-menu-bar-scale, 1));
    padding: calc(0.55rem * var(--player-menu-bar-scale, 1)) calc(0.7rem * var(--player-menu-bar-scale, 1));
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: calc(0.6rem * var(--player-menu-bar-scale, 1)) calc(0.6rem * var(--player-menu-bar-scale, 1)) 0 0;
    background: rgba(255, 255, 255, var(--player-menu-bar-bg-opacity, 0.12));
    color: #fff;
    cursor: pointer;
    font-size: calc(0.9rem * var(--player-menu-bar-scale, 1));
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.menu-bar.is-spread .menu-item {
    flex: 1 1 0;
    max-width: none;
}

.menu-item .bi {
    font-size: calc(1rem * var(--player-menu-bar-scale, 1));
    line-height: 1;
    color: #fff;
    flex-shrink: 0;
}

.menu-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    text-shadow: inherit;
    -webkit-text-stroke: inherit;
    paint-order: inherit;
}

.menu-item.is-active {
    border-color: rgba(255, 255, 255, 0.55);
    border-bottom-color: transparent;
    background: rgba(255, 255, 255, var(--player-menu-bar-bg-opacity-active, 0.32));
    color: #141414;
}

.menu-item.is-active .bi {
    color: #141414;
}

.locale-bar {
    position: absolute;
    top: 0;
    right: 0.9rem;
    z-index: 30;
    display: flex;
    align-items: stretch;
    gap: calc(0.45rem * var(--player-locale-bar-scale, 1));
}

.locale-item {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: calc(3.4rem * var(--player-locale-bar-scale, 1));
    padding: calc(0.55rem * var(--player-locale-bar-scale, 1)) calc(0.7rem * var(--player-locale-bar-scale, 1));
    border: 1px solid transparent;
    border-top: 0;
    border-radius: 0 0 calc(0.6rem * var(--player-locale-bar-scale, 1)) calc(0.6rem * var(--player-locale-bar-scale, 1));
    background: rgba(255, 255, 255, var(--player-locale-bar-bg-opacity, 0.12));
    color: #fff;
    cursor: pointer;
    font-size: calc(0.9rem * var(--player-locale-bar-scale, 1));
    font-weight: 600;
    letter-spacing: 0.04em;
}

.locale-item.is-active {
    border-color: rgba(255, 255, 255, 0.55);
    border-top-color: transparent;
    background: rgba(255, 255, 255, var(--player-locale-bar-bg-opacity-active, 0.32));
    color: #141414;
}

.search-tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(0.35rem * var(--player-locale-bar-scale, 1));
    box-sizing: border-box;
    min-width: calc(3.4rem * var(--player-locale-bar-scale, 1));
    margin-left: calc(0.9rem * var(--player-locale-bar-scale, 1));
    padding: calc(0.55rem * var(--player-locale-bar-scale, 1)) calc(0.85rem * var(--player-locale-bar-scale, 1));
    border: 1px solid transparent;
    border-top: 0;
    border-radius: 0 0 calc(0.6rem * var(--player-locale-bar-scale, 1)) calc(0.6rem * var(--player-locale-bar-scale, 1));
    background: rgba(255, 255, 255, var(--player-locale-bar-bg-opacity, 0.12));
    color: #fff;
    cursor: pointer;
    font-size: calc(0.9rem * var(--player-locale-bar-scale, 1));
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.search-tab.is-active {
    border-color: rgba(255, 255, 255, 0.55);
    border-top-color: transparent;
    background: rgba(255, 255, 255, var(--player-locale-bar-bg-opacity-active, 0.32));
    color: #141414;
}

.search-tab.is-active .bi {
    color: #141414;
}

.search-tab .bi {
    font-size: calc(1rem * var(--player-locale-bar-scale, 1));
}

.search-tab span {
    text-shadow: inherit;
    -webkit-text-stroke: inherit;
    paint-order: inherit;
}

.identify-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: clamp(2.2rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 2rem;
}

.identify-overlay[hidden] {
    display: none;
}

.version-overlay {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100001;
    background: #000;
    color: #fff;
    font-size: clamp(0.75rem, 1.2vh, 1rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    padding: 0.45rem 0.65rem;
    line-height: 1.3;
}

.version-overlay[hidden] {
    display: none;
}
