/* ==========================================================================
   Sanal tur görüntüleyici — sunum katmanı
   ========================================================================== */

html, body {
    margin: 0; padding: 0;
    height: 100%; width: 100%;
    overflow: hidden;
    background: #06090d;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #fff;
    overscroll-behavior: none;
}

#viewer { position: absolute; inset: 0; }

/* ---------- Açılış ekranı ---------- */

#boot {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background: radial-gradient(900px 500px at 50% 40%, #16202e, #06090d);
    z-index: 40;
    transition: opacity .5s;
}
#boot.hidden { opacity: 0; pointer-events: none; }

.boot-inner { text-align: center; padding: 20px; }
.boot-ring {
    width: 42px; height: 42px; margin: 0 auto 20px;
    border: 2px solid rgba(255,255,255,.14);
    border-top-color: var(--brand, #1e88e5);
    border-radius: 50%;
    animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.boot-sub   { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 3px; }

/* ---------- Giriş kartı ---------- */

#intro {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background: rgba(6,9,13,.62);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    z-index: 38;
    padding: 22px;
}
#intro.hidden { display: none; }
.intro-card {
    max-width: 460px; text-align: center;
    background: rgba(18,24,33,.92);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 15px;
    padding: 30px 28px;
    box-shadow: 0 16px 50px rgba(0,0,0,.55);
}
.intro-card h1 { margin: 0 0 10px; font-size: 21px; font-weight: 650; }
.intro-card p  { margin: 0 0 22px; font-size: 14px; line-height: 1.62;
                 color: rgba(255,255,255,.72); }

.v-btn {
    background: var(--brand, #1e88e5);
    color: #fff; border: 0;
    padding: 11px 26px;
    border-radius: 22px;
    font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: filter .15s, transform .15s;
}
.v-btn:hover  { filter: brightness(1.12); }
.v-btn:active { transform: translateY(1px); }

/* ---------- Hata ---------- */

#fail { position: absolute; inset: 0; display: grid; place-items: center; z-index: 45; padding: 20px; }
#fail.hidden { display: none; }
.fail-card {
    background: #131a24; border: 1px solid #2a3442;
    padding: 26px 30px; border-radius: 12px; text-align: center; max-width: 420px;
}
.fail-card b { display: block; margin-bottom: 7px; font-size: 15px; }
.fail-card p { margin: 0; color: rgba(255,255,255,.6); font-size: 13px; }

/* ---------- Hotspot rozetleri ---------- */

.hs-badge {
    display: grid; place-items: center;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: var(--c, #1e88e5);
    color: #fff;
    font-size: 15px; font-weight: 700; line-height: 1;
    border: 2px solid rgba(255,255,255,.92);
    box-shadow: 0 2px 9px rgba(0,0,0,.45);
    animation: pulse 2.4s ease-out infinite;
    cursor: pointer;
}
@keyframes pulse {
    0%   { box-shadow: 0 2px 9px rgba(0,0,0,.45), 0 0 0 0    rgba(255,255,255,.42); }
    70%  { box-shadow: 0 2px 9px rgba(0,0,0,.45), 0 0 0 13px rgba(255,255,255,0); }
    100% { box-shadow: 0 2px 9px rgba(0,0,0,.45), 0 0 0 0    rgba(255,255,255,0); }
}

/* Bilgi paneli içeriği */
.hs-panel { padding: 4px 2px; }
.hs-panel h2 { margin: 0 0 10px; font-size: 16px; }
.hs-panel img { max-width: 100%; border-radius: 7px; margin: 8px 0; }
.hs-panel p { line-height: 1.62; }

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed; inset: 0;
    background: rgba(4,6,10,.92);
    display: grid; place-items: center;
    z-index: 200; padding: 32px;
    animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
.lb-inner { max-width: 94vw; max-height: 88vh; text-align: center; }
.lb-inner img, .lb-inner video {
    max-width: 94vw; max-height: 82vh;
    border-radius: 9px; display: block;
    box-shadow: 0 12px 44px rgba(0,0,0,.6);
}
.lb-inner iframe {
    width: min(90vw, 1100px); aspect-ratio: 16/9; height: auto;
    border: 0; border-radius: 9px;
    box-shadow: 0 12px 44px rgba(0,0,0,.6);
}
.lb-cap { margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.7); }
.lb-x {
    position: absolute; top: 16px; right: 18px;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff; font-size: 15px; cursor: pointer;
}
.lb-x:hover { background: rgba(255,255,255,.18); }

/* ---------- Marka etiketi ---------- */

#brandTag {
    position: absolute; right: 12px; top: 12px;
    z-index: 30;
    font-size: 11px; letter-spacing: .04em;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    background: rgba(6,9,13,.45);
    border: 1px solid rgba(255,255,255,.09);
    padding: 4px 10px; border-radius: 13px;
    backdrop-filter: blur(6px);
    transition: color .15s, border-color .15s;
}
#brandTag:hover { color: #fff; border-color: rgba(255,255,255,.24); }
body.embed #brandTag { display: none; }

/* ---------- PSV ince ayarları ---------- */

.psv-container { background: #06090d; }

.psv-navbar {
    background: linear-gradient(transparent, rgba(6,9,13,.88));
    height: 44px;
}
.psv-button:hover { background: rgba(255,255,255,.12) !important; }

.psv-compass {
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.12);
    overflow: hidden;
}

/* ---------- Kroki (kendi DOM minimap'imiz) ---------- */

.mini {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left, 0px));
    top: calc(12px + env(safe-area-inset-top, 0px));
    width: min(42vw, 210px);
    z-index: 40;
    background: #11161d;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,.5);
    overflow: hidden;
    user-select: none;
}
.mini-stage { position: relative; line-height: 0; }
.mini-img { display: block; width: 100%; height: auto; }

.mini-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 13px; height: 13px;
    border-radius: 50%;
    background: var(--c, #1e88e5);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.6);
    cursor: pointer;
    transition: width .1s, height .1s;
}
.mini-pin::before { content: ''; position: absolute; inset: -9px; }   /* tıklama alanı */
.mini-pin:hover { width: 18px; height: 18px; }
/* Drone noktası: arka plan/kenar YOK — sadece renkli drone ikonu (JS inline verir) */
.mini-pin.aerial {
    background: center/contain no-repeat;
    border: none; box-shadow: none; border-radius: 0;
    width: 26px; height: 26px;
}
.mini-pin.aerial:hover { width: 30px; height: 30px; }
.mini-pin.active:not(.aerial) {
    background: #fff; border-color: var(--c, #1e88e5);
    box-shadow: 0 0 0 3px var(--c, #1e88e5), 0 1px 4px rgba(0,0,0,.6);
    width: 16px; height: 16px; z-index: 3;
}
.mini-pin.aerial.active {
    width: 32px; height: 32px; z-index: 3;
    filter: drop-shadow(0 0 3px var(--c, #1e88e5));
}

.mini-btn {
    position: absolute; top: 6px;
    width: 26px; height: 26px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1; color: #fff;
    background: rgba(9,13,19,.78);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 6px; cursor: pointer; z-index: 4;
}
.mini-btn:hover { background: rgba(30,136,229,.85); }
.mini-big  { right: 6px; }
.mini-hide { left: 6px; }
.mini-close { right: 6px; display: none; }

.mini-reveal {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left, 0px));
    top: calc(12px + env(safe-area-inset-top, 0px));
    width: 40px; height: 40px; padding: 0;
    font-size: 20px; color: #fff; z-index: 40;
    background: rgba(9,13,19,.82);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px; cursor: pointer;
}
.mini-reveal:hover { background: rgba(30,136,229,.85); }

/* Büyütülmüş kroki: ekranı ortalayan geniş görünüm — yakın noktaları
   rahat tıklamak için (serbest zoom yok, takılma yok). */
.mini.mini-max {
    left: 50%; top: 50%; bottom: auto;
    transform: translate(-50%, -50%);
    width: auto; max-width: 94vw;
    z-index: 200;
}
.mini.mini-max::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    background: rgba(4,6,9,.72);
}
.mini.mini-max .mini-img { width: auto; height: auto; max-width: 94vw; max-height: 84vh; }
.mini.mini-max .mini-pin { width: 20px; height: 20px; }
.mini.mini-max .mini-pin.aerial { width: 36px; height: 36px; }
.mini.mini-max .mini-pin.active:not(.aerial) { width: 24px; height: 24px; }
.mini.mini-max .mini-pin.aerial.active { width: 42px; height: 42px; }
.mini.mini-max .mini-big, .mini.mini-max .mini-hide { display: none; }
.mini.mini-max .mini-close { display: flex; }

.psv-gallery { background: rgba(9,13,19,.94); }
.psv-gallery-item-title { font-size: 12px; }

.psv-panel-content { font-size: 14px; }

.psv-tooltip {
    background: rgba(12,17,24,.94);
    border: 1px solid rgba(255,255,255,.12);
    font-size: 12.5px;
}

.psv-virtual-tour-arrow { filter: drop-shadow(0 2px 5px rgba(0,0,0,.55)); }

@media (max-width: 640px) {
    .psv-navbar { height: 40px; }
    #brandTag { top: 8px; right: 8px; font-size: 10px; }
    .intro-card { padding: 24px 20px; }
    .intro-card h1 { font-size: 18px; }

    /* Kroki boyutu JS'te ekrana göre hesaplanıyor (yakınlaştırma onunla
       tutarlı olsun diye); burada sadece pusulayı küçültüyoruz. */
    .psv-compass { width: 64px !important; height: 64px !important; }
}
