/* J. Louis - GBK85 tour-owned branding and Panotour-parity presentation. */

/* J. Louis - Load the original tour's bundled face for consistent menu, tooltip, floorplan, and lightbox typography. */
@font-face {
    font-family: "Open Sans";
    src: url("media/fonts/OpenSans-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

body {
    --font-primary: "Open Sans", Arial, Helvetica, sans-serif;
    --primary-color: #d3312f;
    --primary-color-rgb: 211, 49, 47;
    --secondary-color: #141414;
    --secondary-color-rgb: 20, 20, 20;
    --logo-height: 9rem;
    --gbk85-menu-grey: #535353;
    --gbk85-menu-group-grey-rgb: 41, 41, 41;
}

/* J. Louis - Give the text-based exhibition mark the same role as an installed menu logo. */
.gbk85-menu-brand {
    position: absolute;
    inset: 0 3rem 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: Arial Black, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(3.4rem, 4.8vw, 5.2rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.75);
}

/* J. Louis - Recreate the source menu's grey hierarchy without its black lower panel. */
aside {
    background:
        linear-gradient(
            180deg,
            rgba(83, 83, 83, 0.96) 0%,
            rgba(64, 64, 64, 0.97) 52%,
            rgba(41, 41, 41, 0.98) 100%
        );
}

aside::before {
    background-image: none !important;
    opacity: 0 !important;
}

aside acc-menu {
    background-color: transparent;
}

/* J. Louis - Match the live Panotour group's measured rgba(41,41,41,0.9) caption color. */
aside acc-menu acc-menu-group > acc-menu-item-title {
    background-color: rgba(var(--gbk85-menu-group-grey-rgb), 0.9);
}

aside acc-menu acc-menu-group > acc-menu-item-title:hover,
aside acc-menu acc-menu-group > acc-menu-item-title:focus {
    background-color: var(--gbk85-menu-grey);
}

/* J. Louis - Restore the Panotour Visual Narrative grey while preserving its white/grey hover swap. */
#vn_logo svg #vn_logo_svg2 path,
#vn_logo svg:hover #vn_logo_svg1 path {
    fill: var(--gbk85-menu-grey) !important;
}

/* J. Louis - Fit five visible controls inside the established desktop and mobile common-control rows. */
section[btns][common] {
    gap: 0.8rem;
}

section[btns][common] my-btn {
    margin-right: 0;
}

/* J. Louis - Keep the new floorplan control visually consistent with the other shared common buttons. */
section[btns][common] my-btn.floorplan svg path,
section[btns][common] my-btn.floorplan svg rect,
section[btns][common] my-btn.floorplan svg polygon {
    fill: var(--btn-icon-color);
}

/* J. Louis - Keep the floorplan and bottom navigation glyphs white against GBK85's dark glass controls. */
section[btns][common] my-btn.floorplan,
section[btns][nav] my-btn {
    --btn-icon-color: #fff;
}

/* J. Louis - Reserve a fourth desktop-nav-button slot for Help so the dots and group title stay clear of it. */
@media screen and (min-width: 501px) {
    #bottom-right-cluster section[nav_dots],
    #bottom-right-cluster #group-title {
        right: 19rem;
    }
}

/* J. Louis - Present the source helper artwork as an accessible modal above every tour surface. */
.gbk85-help {
    position: fixed;
    inset: 0;
    z-index: 25000;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: clamp(0.5rem, 2vw, 2rem);
    background: rgba(20, 20, 20, 0.92);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.65s ease;
}

.gbk85-help[hidden] {
    display: none;
}

/* J. Louis - Cross-fade directly over the exiting splash, then use a shorter fade when the visitor dismisses help. */
.gbk85-help.is-open {
    opacity: 1;
}

.gbk85-help.is-closing {
    opacity: 0;
    pointer-events: none;
    transition-duration: 0.18s;
}

.gbk85-help__picture {
    position: absolute;
    inset: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

.gbk85-help__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

/* J. Louis - Keep the close control reachable and legible over both responsive helper variants. */
.gbk85-help__close {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0 0 2px;
    border: 0;
    border-radius: 50%;
    color: #111;
    background: #fff;
    font: 400 34px/1 Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.35);
}

.gbk85-help__close:focus-visible {
    outline: 3px solid #d3312f;
    outline-offset: 3px;
}

body.gbk85-help-open {
    overflow: hidden;
}

/* J. Louis - Match Panotour's compact white Next instruction while leaving pano drag untouched. */
.gbk85-navigation-tooltip {
    position: fixed;
    z-index: 10020;
    max-width: min(24rem, calc(100vw - 2.4rem));
    padding: 0.8rem 1.2rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.4rem;
    color: #171717;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0.4rem 1.4rem rgba(0, 0, 0, 0.28);
    font-family: var(--font-primary);
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
    user-select: none;
}

.gbk85-navigation-tooltip strong,
.gbk85-navigation-tooltip span {
    display: block;
}

.gbk85-navigation-tooltip strong {
    font-size: 1.7rem;
}

.gbk85-navigation-tooltip span {
    margin-top: 0.15rem;
    font-size: 1.5rem;
}

/* J. Louis - Remove the empty gallery-counter line so single-item lightbox titles sit on the header's vertical centre. */
.vn-media-lightbox__counter:empty {
    display: none;
}

/* J. Louis - Recreate Panotour's Easy HTML Lightbox style_2_float_expanded presentation for GBK85. */
.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__backdrop {
    display: block;
    padding: 18px;
    background: #808080;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__dialog {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #808080;
    box-shadow: none;
}

/* J. Louis - Remove the replacement modal header while retaining the source-style floating close control. */
.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__header {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__heading {
    display: none;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__close {
    position: absolute;
    top: 32px;
    right: 32px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #0e3034;
    background: #f3f2f1;
    box-shadow: none;
    font: 0/0 Arial, sans-serif;
    pointer-events: auto;
    transition: color 0.5s ease, background-color 0.5s ease;
}

/* J. Louis - Center the source's 15px close glyph geometrically instead of relying on font-button baselines. */
.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__close::before {
    content: "✕";
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    color: currentColor;
    font: 700 15px/24px var(--vn-media-font);
    transform: translate(-50%, -50%);
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__close:hover {
    color: #fff;
    background: #0e3034;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__close:focus-visible {
    color: #0e3034;
    background: #f3f2f1;
    outline: 0 !important;
    box-shadow: none !important;
}

/* J. Louis - Recreate Viewer.js's collapsing-artwork close transition before the modal is hidden. */
.vn-media-lightbox.info-style_2_float_expanded.is-closing {
    pointer-events: none;
    animation: gbk85-media-lightbox-exit 340ms linear forwards;
}

.vn-media-lightbox.info-style_2_float_expanded.is-closing .vn-media-lightbox__image-canvas {
    opacity: 0.72;
    scale: 0.035;
    transform-origin: 50% 50%;
    transition: scale 300ms cubic-bezier(0.55, 0.085, 0.68, 0.53), opacity 300ms ease;
}

.vn-media-lightbox.info-style_2_float_expanded.is-closing .vn-media-lightbox__video-host {
    opacity: 0.72;
    transform: scale(0.035);
    transform-origin: 50% 50%;
    transition: transform 300ms cubic-bezier(0.55, 0.085, 0.68, 0.53), opacity 300ms ease;
}

@keyframes gbk85-media-lightbox-exit {
    0%,
    78% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__body {
    width: 100%;
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__body.has-info {
    grid-template-columns: 440px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__body.has-info .vn-media-lightbox__info {
    grid-column: 1;
    grid-row: 1;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__body.has-info .vn-media-lightbox__viewport {
    grid-column: 2;
    grid-row: 1;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__viewport {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* J. Louis - Match the source's pale left information panel and Open Sans artwork hierarchy. */
.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__info {
    overflow: hidden;
    padding: 0;
    border: 0;
    color: #0e3034;
    background: #f3f2f1;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description {
    box-sizing: border-box;
    width: auto;
    height: auto;
    max-height: calc(100% - 42px);
    margin: 42px 0 0 52px;
    overflow-y: overlay;
    overscroll-behavior: contain;
    padding-right: 52px;
    color: #0e3034;
    font-size: 13px;
    /* J. Louis - Match the published fallback's measured width after loading the intended Open Sans face. */
    letter-spacing: 0.5px;
    line-height: 1.5;
    scrollbar-color: auto;
    text-align: left;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description::-webkit-scrollbar {
    width: 8px;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description::-webkit-scrollbar-track {
    background: #dad9d8;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description::-webkit-scrollbar-thumb {
    background: #0e3034;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description h1 {
    margin: 0 0 8px;
    color: #0e3034;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description h2 {
    margin: 0 0 24px;
    color: #0e3034;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description h3 {
    margin: 4px 0;
    color: #0e3034;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description h4 {
    margin: 0 0 6px;
    color: #0e3034;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.5;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description p {
    margin: 24px 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
}

/* J. Louis - Place compact square zoom controls in the source viewer's bottom-right position. */
.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__zoom {
    right: 36px;
    bottom: 35px;
    gap: 4px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__zoom button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: none;
    font: 600 14px/1 var(--vn-media-font);
}

/* J. Louis - Preserve Panotour's zoom-in, zoom-out, reset visual order with the existing controls. */
.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__zoom button:nth-child(3) {
    order: 1;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__zoom button:nth-child(1) {
    order: 2;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__zoom button:nth-child(2) {
    order: 3;
}

.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__zoom button:hover,
.vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__zoom button:focus-visible {
    background: #0e3034;
}

.vn-media-lightbox.info-style_2_float_expanded button:focus-visible,
.vn-media-lightbox.info-style_2_float_expanded a:focus-visible {
    outline-color: #0e3034;
}

/* J. Louis - Follow the source portrait layout by moving the information panel below the media. */
@media screen and (max-width: 768px) {
    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__body.has-info {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 301px;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__body.has-info .vn-media-lightbox__viewport {
        grid-column: 1;
        grid-row: 1;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__body.has-info .vn-media-lightbox__info {
        grid-column: 1;
        grid-row: 2;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__info {
        padding: 0;
        border: 0;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description {
        height: calc(100% - 44px);
        max-height: none;
        margin: 22px 0 22px 22px;
        padding-right: 14px;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description h1 {
        margin-bottom: 8px;
        font-size: 32px;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description h2 {
        margin-bottom: 12px;
        font-size: 16px;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description h3 {
        font-size: 12px;
    }

    .vn-media-lightbox.info-style_2_float_expanded .vn-media-lightbox__description p {
        margin: 16px 0;
        font-size: 16px;
        line-height: 1.4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vn-media-lightbox.info-style_2_float_expanded.is-closing {
        animation: none;
    }

    .vn-media-lightbox.info-style_2_float_expanded.is-closing .vn-media-lightbox__image-canvas,
    .vn-media-lightbox.info-style_2_float_expanded.is-closing .vn-media-lightbox__video-host {
        opacity: 1;
        scale: 1;
        transform: none;
        transition: none;
    }
}

/* J. Louis - Recreate the source lockup over its clean, higher-resolution painting. */
#splash_screen {
    background: #153c2b;
    backdrop-filter: none;
}

/* J. Louis - Signal that the complete splash becomes the entry control once the initial scene is ready. */
body.splash #splash_screen:has(.enter.ready) {
    cursor: pointer;
}

#splash_screen #splash_image {
    object-position: center center;
}

#splash_screen .splash_overlay {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 25%, rgba(0, 0, 0, 0.2) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.16), transparent 45%);
}

#splash_screen > .gbk85-splash-lockup:not(.splash_overlay):not(#splash_spinner) {
    position: absolute;
    right: clamp(3rem, 6vw, 10rem);
    bottom: clamp(4rem, 9vh, 11rem);
    z-index: 3;
    display: flex;
    align-items: flex-end;
    max-width: min(72rem, 56vw);
    color: #fff;
    text-align: right;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
}

.gbk85-splash-title {
    font-family: Arial Black, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(6rem, 9vw, 13rem);
    font-weight: 900;
    letter-spacing: 0.025em;
    line-height: 0.9;
}

.gbk85-splash-subtitle {
    margin-top: 1.6rem;
    font-size: clamp(1.4rem, 1.25vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.16em;
    line-height: 1.35;
}

#splash_screen > .gbk85-splash-lockup:not(.splash_overlay):not(#splash_spinner) button {
    width: 15rem;
    height: 4.6rem;
    margin-top: 2.2rem;
    border: 0;
    border-radius: 0;
    background: #d3312f;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* J. Louis - Animate the rebuilt text lockup with the same timing as the standard v7 entry control. */
body.splash:not(.intro-zoom) #splash_screen:not(.exiting) .gbk85-splash-title,
body.splash:not(.intro-zoom) #splash_screen:not(.exiting) .gbk85-splash-subtitle {
    opacity: 0;
    animation: splashFadeInUp 0.6s ease 0.5s forwards;
}

/* J. Louis - Center the complete identity on narrow screens without covering the painting signature. */
@media screen and (max-width: 700px) {
    #splash_screen > .gbk85-splash-lockup:not(.splash_overlay):not(#splash_spinner) {
        right: 2.4rem;
        bottom: max(6rem, env(safe-area-inset-bottom));
        left: 2.4rem;
        align-items: center;
        max-width: none;
        text-align: center;
    }

    .gbk85-splash-title {
        font-size: clamp(5rem, 19vw, 8rem);
    }

    .gbk85-splash-subtitle {
        font-size: 1.25rem;
        letter-spacing: 0.1em;
    }

    section[btns][common] {
        gap: 0.55rem;
    }
}

/* J. Louis - Respect visitors who request reduced motion across the custom splash additions. */
@media (prefers-reduced-motion: reduce) {
    .gbk85-help,
    .gbk85-help.is-closing {
        transition-duration: 1ms;
    }

    body.splash:not(.intro-zoom) #splash_screen:not(.exiting) .gbk85-splash-title,
    body.splash:not(.intro-zoom) #splash_screen:not(.exiting) .gbk85-splash-subtitle {
        opacity: 1;
        animation: none;
    }
}
