﻿#panorama {
    /* width: 100dvw; */
    height: 100dvh;
    --focus-ring: 
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #222;
    overflow: hidden;
}

/* Highly visible, accessible focus indicator */
:where(*):focus-visible {
    outline: 3px solid #000 !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px #ffeb00 !important;
    border-radius: 3px;
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 999999; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modalContent {
    background-color: #fefefe;
    margin: 1em auto; /* 15% from the top and centered */
    padding: 1em;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.modalContent img {
    width: 100%;
    height: auto;
}

#infoModalContent {
    font-family: sans-serif;
    max-width: min(649px, 80%);
    height: 80vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: auto;
    border: 0;
}

figure {
  margin: 2rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

/* Typography */
p {
  margin: 0 0 1.25rem;
  max-width: 70ch;
}

ul,
ol {
  max-width: 70ch;
}

li {
  margin-bottom: 0.5rem;
}

/* The Close Button */
.close {
    color: #000;
    background-color: #fff;
    float: right;
    font-size: 2em;
    position: fixed;
    right: 0;
    top: 0;
    width: 50px;
    font-weight: bold;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.custonToolTip .modal-tooltip-text {
    position: absolute;
    border-radius: 3px;
    background-color: rgba(156, 23, 160, 0.8);
    color: #fff;
    text-align: center;
    max-width: 200px;
    padding: 5px 10px;
    margin-top: -65px;
    left: 34%;
    cursor: default;
    visibility: hidden;
    width: 130px;
    z-index: 10;
}

.custonToolTip:hover .modal-tooltip-text {
  visibility: visible;
}

.custonToolTip span img {
    padding-top: 0;
    width: 150px;
}


@media (max-width: 900px){
    .custonToolTip span img {
        padding-top: 0;
        width: 80px;
    }
}
.custonToolTip:hover span img {
    animation: wiggle 2.5s infinite;
    animation-timing-function: ease-in-out;
}

@keyframes wiggle {
    0% { transform: rotate(0deg); }
   25% { transform: rotate(5deg); }
   75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

.videoSquircle {
    position: absolute;
    bottom: 50px;
    right: 50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    transform: rotate(0deg);
    opacity: 1;
    transition: transform 0.5s, opacity 0.2s;
}

.videoSquircle:has(video:focus-visible)::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    outline: 4px solid #000;
    outline-offset: -4px;
    box-shadow: inset 0 0 0 8px #ffeb00;
    pointer-events: none;
    z-index: 10;
}

@media (min-width: 900px) {
    .videoSquircle {
        bottom: 20px;
        right: 20px;
    }
}

/* The “border that wipes” */
.timeBorder{
    position:absolute;
    inset:0;
    pointer-events:none;
    z-index:5;

    /* thickness of the border */
    --thickness: 8px;

    /* how much of the ring is visible (0..1) */
    --p: 1;

    /* colour of the remaining ring */
    --ring: #9c17a0;
    /* start point at 12 o’clock (top) */
    transform: rotate(0deg);

    background:
        conic-gradient(var(--ring) calc(var(--p) * 1turn),
                    rgba(255,255,255,0) 0);

    /* Cut out the middle so it becomes a border ring */
    -webkit-mask: radial-gradient(farthest-side,
                        transparent calc(100% - var(--thickness)),
                        #000 calc(100% - var(--thickness)));
            mask: radial-gradient(farthest-side,
                        transparent calc(100% - var(--thickness)),
                        #000 calc(100% - var(--thickness)));

    /* optional */
    filter: drop-shadow(0 0 2px rgba(0,0,0,.35));
}

.timeBorder{
    opacity: 0;                 /* hidden by default */
    transition: opacity 120ms linear;
}

.videoSquircle.ring-ready .timeBorder{
    opacity: 1;                 /* show when we know duration */
}
.scene-ready {
    opacity: 0;
    transform: rotate(10deg);
}

.play-overlay{ z-index:10; }

.play-overlay {
    position: absolute;
    top: 165px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: url('/webimages/Panoramics/play-icon3.svg') no-repeat center;
    background-size: contain;
    cursor: pointer;
    z-index: 10;
}

.pnlm-load-button {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    display: grid;
    place-items: center;
    align-content: center;
}

.pnlm-load-button p {
    display: none;
}

.pnlm-load-button img {
    display: block;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1;
    filter: invert(1);
}

div.pnlm-tooltip span {
    position: absolute;
    border-radius: 3px;
    background-color: rgba(156, 23, 160, 0.8);
    color: #fff;
    text-align: center;
    max-width: 200px;
    padding: 5px 10px;
    margin-left: -220px;
    cursor: default;
}

div.pnlm-tooltip.pnlm-scene span {
    visibility: visible;
}
span.pnlm-about-msg {
    display: none !important;
}
div.pnlm-tooltip:hover span:after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    border-color: rgba(156, 23, 160, 0.8) transparent transparent transparent;
    bottom: -20px;
    left: -10px;
    margin: 0 50%;
}

/* https://css-shape.com/squircle/ */
.squircle {
  --r: 50%; /* between 0% [square] and 50% [squircle] (you can use pixel as well) */
  --_r: clamp(0%,var(--r)/2,25%);
  --_v: calc(var(--_r)*(1 - sqrt(2)/4));
  --_p: calc(var(--_v) - var(--_r)/2);
  clip-path: shape(
    from var(--_v) var(--_p),
    curve to 50% 0 with var(--_r) 0,
    curve to calc(100% - var(--_v)) var(--_p) with calc(100% - var(--_r)) 0,
    curve to calc(100% - var(--_p)) var(--_v) with calc(100% - 2*var(--_p)) calc(2*var(--_p)),
    curve to 100% 50% with 100% var(--_r),
    curve to calc(100% - var(--_p)) calc(100% - var(--_v)) with 100% calc(100% - var(--_r)),
    curve to calc(100% - var(--_v)) calc(100% - var(--_p)) with calc(100% - 2*var(--_p)) calc(100% - 2*var(--_p)),
    curve to 50% 100% with calc(100% - var(--_r)) 100%,
    curve to var(--_v) calc(100% - var(--_p)) with var(--_r) 100%,
    curve to var(--_p) calc(100% - var(--_v)) with calc(2*var(--_p)) calc(100% - 2*var(--_p)),
    curve to 0 50% with 0 calc(100% - var(--_r)),
    curve to var(--_p) var(--_v) with 0 var(--_r),
    curve to var(--_v) var(--_p) with calc(2*var(--_p)) calc(2*var(--_p))
  );
  width: 25px;
  height: 25px;
  aspect-ratio: 1;
  background: yellow;
}

.pnlm-scene span .squircle i {
    color: black;
    font-size: 0.6rem;
}

.pnlm-scene span .squircle {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    position: absolute;
    top: -12.5px;
    right: -12px;
}

.pnlm-container {
    background: #990033;
}

.modal-tooltip {
    visibility: hidden; /* Hidden by default */
    width: 130px;
    background-color: black;
    color: #ffffff;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
    position: absolute;
    z-index: 10;
}

/* -----------------------------
   Side menu: <details> section
------------------------------ */
#sideMenu details{
    margin: 0 0 1.25em;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: .5em;
    /* overflow: clip; */
}

/* Summary row */
#sideMenu summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75em;
    padding: .85em 1em;
    font-weight: 700;
    color: rebeccapurple;
    background: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.02));
}

/* Remove default marker (Chrome/Safari) */
#sideMenu summary::-webkit-details-marker{ display:none; }

/* Custom chevron */
#sideMenu summary::after{
    content: "";
    width: .55em;
    height: .55em;
    border-right: 2px solid rgba(0,0,0,.55);
    border-bottom: 2px solid rgba(0,0,0,.55);
    transform: rotate(-45deg);
    transition: transform .18s ease;
    flex: 0 0 auto;
}

#sideMenu details[open] > summary::after{
    transform: rotate(45deg);
}

/* Summary hover/focus */
#sideMenu summary:hover{
    background: linear-gradient(to bottom, rgba(0,0,0,.07), rgba(0,0,0,.03));
}

/* #sideMenu summary:focus{ outline: none; } */
#sideMenu summary:focus-visible{
    /* box-shadow: 0 0 0 3px rgba(0, 98, 255, .25); */
}

/* List reset */
#sideMenu details ul{
    margin: 0;
    padding: .25em;
    list-style: none;
    display: grid;
    gap: .5em;
    border-top: 1px solid rgba(0,0,0,.08);
}

#sideMenu details li{ margin: 0; }

#sideMenu details li a {
    display: flex;
}

/*@TODO: think about the styling for this. Maybe just an outline? */
#sideMenu details li a .squircle {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sideMenu details li a .squircle i {
    margin-right: 0;
    font-size: 0.6rem;
}

/* Make your <a> look like buttons */
#sideMenu details a{
    display: block;
    text-decoration: none;

    padding: .5em .5em;
    border-radius: .2em;

    color: #111;
    border: 1px solid rgba(0,0,0,.12);

    transition: transform .06s ease, background .14s ease, border-color .14s ease;
}

#sideMenu details a:hover{
    background: rgba(0,0,0,.07);
    border-color: rgba(0,0,0,.18);
}

#sideMenu details a:active{
    transform: translateY(1px);
}

#sideMenu details a i{
    width: 1.25em;
    text-align: center;
    margin-right: .75em;
    color: rgba(0,0,0,.65);
    font-size: 1.1em;
}

#sideMenu details a:hover i,
#sideMenu details a.is-active i{
    color: rgba(0,0,0,.95);
}

/* Keyboard focus */
/* #sideMenu details a:focus{ outline: none; } */
#sideMenu details a:focus-visible{
    /* box-shadow: 0 0 0 3px rgba(0, 98, 255, .25); */
}

/* Optional "active" location state:
   add class="is-active" to the <a> for current scene */
#sideMenu details a.is-active {
    background: rgba(0,0,0,.12);
    border-color: rebeccapurple;
    font-weight: 700;
}

/* -----------------------------
   Location info typography
------------------------------ */

#sideMenu .locationInformation {
    margin-top: 1.25em;
    margin-left: 0.7em;
    margin-right: 0.7em;
}

#sideMenu .locationInformation h1{
    margin: 0 0 .5em;
    font-size: 1.25em;
    line-height: 1.2;
}

#sideMenu .locationInformation p{
    margin: 0 0 .85em;
    font-size: .95em;
    line-height: 1.55;
    color: rgba(0,0,0,.78);
}


div#sideMenu {
    height: 100dvh;
    width: 300px;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 1em;
    position: absolute;
    z-index: 9999;
    top: 0;
    left: 0;
    background-color: #ffffffde;
    backdrop-filter: blur(5px);
    font-family: sans-serif;
    font-size: 1em;
    box-sizing: border-box;
}

/* Not mobile */
@media (min-width: 901px) {
    div#sideMenu {
        transform: translateX(-110%);
        transition: transform 0.8s ease;
    }
    div#sideMenu.transition-in {
        transform: translateX(0);
    }
}


.logo {
    width: 150px;
    height: auto;
    margin-bottom: 2em;
}

/* Pannellum loading box */
#panorama .pnlm-load-box{
    background: rgba(255,255,255,.92);
    color: #111;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Loading bar */
#panorama .pnlm-lbar{
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 999px;
    overflow: hidden;
    height: 10px;
}

/* Fill */
#panorama .pnlm-lbar-fill{
    background: #000; /* set to your brand colour if you want */
}

/* Optional: tighten the loader text */
#panorama .pnlm-load-box p{
    margin: 0 0 10px;
    font: 700 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.pnlm-panorama-info {
    position: absolute;
    top: 0;
    display: none !important;
}
/* =========================
   Minimal sideMenu scrollbar
   ========================= */

/* Firefox */
#sideMenu{
    scrollbar-width: thin;                 /* auto | thin | none */
    scrollbar-color: rgba(0,0,0,.35) transparent;
}

/* WebKit (Chrome, Edge, Safari) */
#sideMenu::-webkit-scrollbar{
    width: 8px;                            /* slim */
}

#sideMenu::-webkit-scrollbar-track{
    background: transparent;              /* invisible track */
}

#sideMenu::-webkit-scrollbar-thumb{
    background-color: rgba(0,0,0,.35);     /* subtle thumb */
    border-radius: 999px;
    border: 2px solid transparent;         /* creates padding */
    background-clip: content-box;          /* keeps it pill-shaped */
}

#sideMenu::-webkit-scrollbar-thumb:hover{
    background-color: rgba(0,0,0,.55);     /* a little more visible on hover */
}

/* Optional: fade in scrollbar only when scrolling (WebKit) */
#sideMenu{
    overscroll-behavior: contain;
}

/* Base pill styles (hidden by default; shown on mobile) */
.menuPill{
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 10000;

    display: none; /* will show under 900px */
    align-items: center;
    gap: .55em;

    padding: .7em 1em;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.15);
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    font: 700 14px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: rgba(0,0,0,.85);
    cursor: pointer;

    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.menuPill i{
    font-size: 1.05em;
    opacity: .9;
}

/* .menuPill:focus{ outline: none; } */
.menuPill:focus-visible{
    /* box-shadow: 0 0 0 3px rgba(0, 98, 255, .25), 0 10px 24px rgba(0,0,0,.18); */
}

/* Mobile behaviour */
@media (max-width: 900px){
    .pnlm-panorama-info {
        position: absolute;
        top: 0;
        display: inline !important;
        height: fit-content;
    }

    .videoSquircle {
        bottom: 15px;
        right: 15px;
    }

    /* Show the pill */
    .menuPill{
        display: inline-flex;
    }

    /* Hide logo on mobile */
    #sideMenu .logo{
        display: none;
    }

        #sideMenu.is-open .logo{
        display: block;
        margin-bottom: 1em;
    }

    /* Side menu becomes full-screen overlay on mobile */
    #sideMenu{
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        left: 0;
        top: 0;
        border-radius: 0;
        padding: 1em;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    /* When open */
    #sideMenu.is-open{
        transform: translateX(0);
    }
}

/* =========================
   Minimap
   ========================= */

.minimap {
    position: absolute;
    left: 20px;
    bottom: 60px;
    width: 100px;
    height: 100px;
    border: 2px solid #7da186;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(-400%);
    transition: transform 0.8s ease;
}

.minimap.minimap.transition-in {
    transform: translateX(0);
}


@media (min-width: 900px) {
    .minimap {
        left: 320px;
        bottom: 20px;
        transform: translateX(-800%);
        transition: transform 0.8s ease;
    }

    .minimap.transition-in {
        left: 320px;
        transform: translateX(0);
    }
}

.minimap i {
    color: #2D432E;
}

/* Background generator */
.minimap {
    background-image: linear-gradient(#7DA186 1px, transparent 1px), linear-gradient(to right, #7DA186 1px, transparent 1px);
    background-size: 14px 14px;
    background-color: #99c7a4;
}

/* Previous Scene button */
#prevBtn {
    position: absolute;
    left: 20px;
    top: 60px;
    transform: translateX(-400%);
    transition: transform 0.8s ease, background-color 300ms ease-out;
    width: fit-content;
    height: 44px;
    padding: 0 1em;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    color: white;
    background-color: rgba(156, 23, 160, 0.8);
    font-size: 1rem;
}

#prevBtn i {
    margin-right: 0.4em;
}

#prevBtn:hover {
    background-color: rgba(156, 23, 160, 1);
}

#prevBtn:disabled {
    background-color: grey;
    color: lightgrey;
    cursor: not-allowed;
    display: none;
}

#prevBtn.transition-in {
    transform: translateX(0);
}

@media (min-width: 900px) {
    #prevBtn {
        left: 320px;
        top: 20px;
        transform: translateX(-900%);
    }

    #prevBtn.transition-in {
        left: 320px;
        transform: translateX(0);
    }
}


/* CTA  open day */
a.open-day-cta {
    transform: translateY(-400%);
    transition: transform 0.8s ease, background-color 300ms ease-out;
    position: absolute;
    right: 20px;
    top: 60px;
    width: fit-content;
    padding: 10px 1em;
    border-radius: 10px;
    cursor: pointer;
    color: black;
    background-color: #67d98a;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid black;
}

a.open-day-cta i {
    margin-left: 0.4em;
}

a.open-day-cta.transition-in {
    transform: translateY(0);
}

a.open-day-cta:hover {
    background-color: #0c9359;
    color: #fff;
}

@media (min-width: 900px) {
    a.open-day-cta {
        right: 20px;
        top: 20px;
        transform: translateY(-900%);
    }

    a.open-day-cta.transition-in {
    transform: translateY(0);
}
}

@media (max-width: 420px) {
    a.open-day-cta {
        left: 20px;
        top: 110px;
    }
}