/* Demo səhifələrinin karkası: üst panel + səhnə + sağ panel.
   index.html bu faylı yükləmir. */

html.one-screen,
html.one-screen body { height: 100% }

.app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  min-height: 0;
}

/* ---------- üst panel ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 5px 10px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.home:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.brand b {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.brand span {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* seçim yolu — ui/crumbs.js doldurur */
.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.crumbs button {
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--muted);
}
.crumbs button:hover {
  background: var(--accent-soft);
  color: var(--ink);
}
.crumbs .cur {
  color: var(--ink);
  font-weight: 600;
  padding: 4px 6px;
}

/* status açıqlaması */
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.legend .free { background: var(--ok) }
.legend .hold { background: var(--hold) }
.legend .sold { background: var(--sold) }

/* ---------- gövdə: səhnə + yan panel ---------- */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  min-height: 0;
}

.side {
  background: var(--surface);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  min-height: 0;
}
.side-in {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side h2 {
  margin: 2px 0 0;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.015em;
  text-wrap: balance;
}

/* ---------- 3D səhnə ---------- */
.canvas3d {
  position: relative;
  background: var(--stage);
  min-height: 0;
  overflow: hidden;
}
.canvas3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* səhnə üzərindəki qatlar */
.hud {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(5, 15, 20, .72);
  color: var(--stage-ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  pointer-events: none;
  max-width: calc(100% - 24px);
}

.tip {
  position: absolute;
  pointer-events: none;
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  white-space: nowrap;
  transform: translate(14px, -50%);
  z-index: 3;
}
/* Çox sətirli ipucu: towers demosunda <b> + <span> sətirləri ayrı-ayrı
   gedir, liman demosunda isə hamısı bir sətirdə yapışırdı. */
.tip b { font-family: var(--f-display); display: block }
.tip span { display: block; color: var(--muted) }
.tip .tip-cta { color: var(--accent); margin-top: 2px }

.loadmsg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stage-muted);
  font-size: 13px;
  pointer-events: none;
}

/* səhnənin sol üstündəki "geri" düyməsi */
.stage-back {
  position: absolute;
  left: 12px;
  top: 12px;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

/* səhnənin sağ üstündəki rejim düymələri */
.viewbar {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.viewbar.left {
  left: 12px;
  right: 12px;
  justify-content: flex-start;
}
.viewbar button {
  border: 0;
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.viewbar button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.viewbar .sp { flex: 1 }

@media (max-width: 900px) {
  html.one-screen,
  html.one-screen body { height: auto }
  .app {
    height: auto;
    min-height: 100%;
  }
  .main { grid-template-columns: 1fr }
  .side {
    border-left: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }
  .top { padding: 10px 16px }
  .side-in { padding: 16px }
  .canvas3d.fill {
    height: 62vh;
    min-height: 340px;
  }
}

/* ---------- file:// xəbərdarlığı ----------
   Yalnız fayl birbaşa açılanda görünür (file-protocol.js əlavə edir). */
.file-warn {
  position: fixed;
  inset: 0;
  z-index: 100;
  margin: auto;
  width: min(560px, calc(100% - 32px));
  height: max-content;
  max-height: calc(100% - 32px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.file-warn b {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: -.01em;
}
.file-warn p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.file-warn code {
  align-self: stretch;
  font-family: var(--f-mono);
  font-size: 13px;
  background: var(--stage);
  color: var(--stage-ink);
  border-radius: 8px;
  padding: 10px 12px;
}
.file-warn p code {
  display: inline;
  padding: 1px 5px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: inherit;
}
.file-warn .btn {
  margin-top: 6px;
}

/* ---------- gün vaxtı seçicisi ----------

   Modelin ÜZƏRİNDƏ üzür, üst paneldə deyil: əvvəl dil seçicisinin yanında
   kiçik bir cüt düymə idi və demo göstərilən zaman heç kim onu görmürdü.
   Modelin küncündə, günəş/ay nişanı ilə — nəyi dəyişdiyi baxan adama
   izahsız aydın olur. */
.timesw {
  position: absolute;
  /* BİR SƏTİR AŞAĞI: səhnənin sol üstündə "geri" düyməsi var
     (.stage-back, top 12 + hündürlük ≈ 34), portfel səhifələrində isə
     başlıqdaki "← Portfolio" keçidi. 14-də seçici onların ÜSTÜNƏ
     düşürdü. 56 ikisini də buraxır. */
  top: 56px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(8, 20, 28, .55);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(4, 12, 18, .28);
}

.timesw button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .8);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s, color .14s;
}

.timesw button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.timesw button svg .is-fill { fill: currentColor; stroke: none }

.timesw button:hover { color: #fff }

/* Seçilmiş vaxt ağ lövhədədir: gecə fonunda da, gündüz səmasında da oxunur. */
.timesw button.on {
  background: #fff;
  color: #0F2431;
}


@media (max-width: 900px) {
  .timesw { top: 52px; left: 10px }
  .timesw button { padding: 6px 11px; font-size: 12px }
  .timesw button span { display: none }
  .timesw button svg { width: 17px; height: 17px }
}

/* ---------- KİNEMATİK REJİM ----------

   `?cinema=1` ilə açılır (bax core/cinema.js). Satış videosu üçün TƏMİZ
   kadr lazımdır: bütün interfeys gizlənir, səhnə isə bütün pəncərəni
   tutur. YAZI QƏSDƏN YOXDUR — başlıq və altyazı montajda qoyulur.

   `!important` burada yerindədir: qayda demoların ÖZ üslublarını
   (grid sütunları, panel enləri) birdəfəlik üstələməlidir. */
body.cinema .top,
body.cinema .side,
body.cinema .legend,
body.cinema .viewbar,
body.cinema .viewsw,
body.cinema .viewcam,
body.cinema .timesw,
body.cinema .stage-back,
body.cinema .stage-hint,
body.cinema .lang,
/* Hər demonun nişan qabı başqa addadır — hamısı burada. */
body.cinema #tags,
body.cinema #pinsHost,
body.cinema .plot-tag,
body.cinema .pin,
body.cinema #pins,
body.cinema #tip,
body.cinema #elev,
body.cinema .hud,
body.cinema .inspectsw,
body.cinema .inspect,
body.cinema #inspect { display: none !important }

body.cinema .main { grid-template-columns: minmax(0, 1fr) !important }
body.cinema .stage-wrap { padding: 0 !important }
body.cinema .stage { border-radius: 0 !important; border: 0 !important }
/* Kursor kadra düşməsin. */
body.cinema { cursor: none }
/* Səhnə 16:9 qalır, amma başlıq gizləndiyinə görə tam hündürlüyü alır. */
body.cinema .stage { width: min(100%, calc(100dvh * 16 / 9)) !important }

/* ---------- BƏLƏDÇİ REJİMİ ----------

   `?guide=1` ilə açılır (bax core/guide.js). Kinematik rejimin TƏRSİDİR:
   orada interfeys gizlənir, burada isə interfeys MÖVZUDUR — alıcının
   binanı, mərtəbəni və mənzili necə seçdiyi göstərilir. Ona görə heç nə
   gizlədilmir; yalnız iki şey əlavə olunur: altda izah zolağı və
   basılan düymənin üstündə işıq halqası. */
.guide-ui {
  position: fixed;
  inset: 0;
  z-index: 60;
  /* Qat yalnız GÖSTƏRİR; klikləri bələdçinin özü edir, ona görə
     mausun qarşısını kəsmir. */
  pointer-events: none;
}

/* Halqa elementin ÜSTÜNDƏ dayanır, onu örtmür: fon boşdur, yalnız
   kənar və xarici kölgə var — altındakı mətn oxunaqlı qalır. */
.guide-spot {
  position: fixed;
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent),
              0 0 0 9999px rgba(6, 18, 24, .18);
  transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease;
}

.guide-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(760px, calc(100vw - 40px));
  padding: 13px 16px 13px 18px;
  border-radius: 14px;
  background: rgba(10, 26, 34, .92);
  color: #EAF3F6;
  box-shadow: 0 18px 44px -18px rgba(6, 18, 24, .8);
  pointer-events: auto;
}
.guide-no {
  flex: none;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: #7FC8D4;
}
.guide-say {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
}
.guide-dots { display: flex; gap: 4px; flex: none }
.guide-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(234, 243, 246, .28);
  transition: background .25s;
}
.guide-dots i.on { background: #7FC8D4 }
.guide-x {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9FB4BD;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.guide-x:hover { color: #EAF3F6 }

/* Bələdçi gedəndə ipucular yolu kəsir: onlar MAUS üçündür, burada isə
   maus yoxdur və kadrda artıq qutu kimi görünürlər. Səhnənin öz
   ipucu zolağı (`.hud`) da gedir — izahı artıq bələdçi verir və
   ikisi ekranın altında üst-üstə düşürdü. */
body.guide #tip,
body.guide #tip2,
body.guide .hud,
body.guide .inspectsw,
body.guide .stage-hint { display: none !important }

/* Dar ekranda zolaq nömrə və nöqtələri atır — cümlə qalır. */
@media (max-width: 560px) {
  .guide-no, .guide-dots { display: none }
  .guide-bar { bottom: 12px; padding: 11px 12px }
}
