/* Bliss Itapeti — presenter interface on top of the 3DVista player */

@font-face { font-family: "BlissUI"; src: url("../fonts/Montserrat-Light.woff") format("woff"); font-weight: 300; }
@font-face { font-family: "BlissUI"; src: url("../fonts/Montserrat-Regular.woff") format("woff"); font-weight: 400; }
@font-face { font-family: "BlissUI"; src: url("../fonts/Montserrat-Bold.woff") format("woff"); font-weight: 600 700; }

:root {
  --gold: #D8AE6C;
  --gold-soft: #E4BF84;
  --navy: #14172A;
  --glass: rgba(16, 19, 36, 0.55);
  --glass-strong: rgba(16, 19, 36, 0.78);
  --line: rgba(255, 255, 255, 0.14);
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.68);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: clamp(14px, 2.4vw, 28px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

#bui {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none;
  font-family: "BlissUI", "Montserrat", system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
}
#bui * { box-sizing: border-box; }
/* :where keeps this reset at zero specificity so component classes below win */
:where(#bui) button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#bui button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* soft shades so white text reads on bright scenes */
.bui-shade { position: absolute; left: 0; right: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.bui-shade.top { top: 0; height: 170px; background: linear-gradient(rgba(10, 12, 24, .55), rgba(10, 12, 24, 0)); }
.bui-shade.bottom { bottom: 0; height: 260px; background: linear-gradient(rgba(10, 12, 24, 0), rgba(10, 12, 24, .6)); }

.bui-layer { transition: opacity .45s var(--ease), transform .45s var(--ease); }
#bui.is-hidden .bui-layer, #bui.is-hidden .bui-shade { opacity: 0; pointer-events: none !important; }
#bui.is-hidden .bui-layer.top { transform: translateY(-12px); }
#bui.is-hidden .bui-layer.bottom { transform: translateY(16px); }

/* ---------- top bar ---------- */
.bui-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: var(--pad);
}
.bui-title { min-width: 0; }
.bui-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.bui-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.bui-name {
  margin-top: 8px;
  font-size: clamp(22px, 2.6vw, 34px); font-weight: 300; letter-spacing: .01em; line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bui-title.swap .bui-eyebrow, .bui-title.swap .bui-name { animation: bui-in .6s var(--ease) both; }
.bui-title.swap .bui-name { animation-delay: .05s; }
@keyframes bui-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.bui-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.bui-logo { height: 40px; width: auto; display: block; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35)); pointer-events: none; }
.bui-sep { width: 1px; height: 30px; background: var(--line); }

.bui-icon {
  pointer-events: auto;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.bui-icon:hover { background: var(--glass-strong); border-color: rgba(216, 174, 108, .6); }
.bui-icon:active { transform: scale(.94); }
.bui-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bui-icon[hidden] { display: none; }

/* floating "show interface" button while hidden */
.bui-reveal {
  position: absolute; right: var(--pad); bottom: calc(var(--pad) + var(--safe-b));
  opacity: 0; transform: scale(.9); pointer-events: none !important;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
#bui.is-hidden .bui-reveal { opacity: .75; transform: none; pointer-events: auto !important; }
#bui.is-hidden .bui-reveal:hover { opacity: 1; }

/* ---------- bottom dock ---------- */
.bui-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 var(--pad) calc(var(--pad) + var(--safe-b));
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.bui-tabs {
  pointer-events: auto;
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.bui-tab {
  padding: 8px 18px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: color .25s, background .25s;
}
.bui-tab:hover { color: #fff; }
.bui-tab[aria-selected="true"] { background: var(--gold); color: var(--navy); }

.bui-row { width: 100%; max-width: 1180px; display: flex; align-items: center; gap: 12px; }
.bui-strip {
  pointer-events: auto;
  flex: 1; min-width: 0;
  display: flex; gap: 12px;
  overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
  padding: 6px 4px 8px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.bui-strip::-webkit-scrollbar { display: none; }
.bui-strip.center { justify-content: center; }

.bui-card {
  position: relative; flex: 0 0 auto;
  width: 164px; height: 100px; border-radius: 14px; overflow: hidden;
  scroll-snap-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.bui-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease), filter .35s; filter: saturate(.92) brightness(.9); }
.bui-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(rgba(0, 0, 0, 0) 40%, rgba(8, 10, 20, .78));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  transition: box-shadow .3s;
}
.bui-card span {
  position: absolute; left: 12px; right: 10px; bottom: 9px; z-index: 1;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em; line-height: 1.25; text-align: left;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.bui-card:hover { transform: translateY(-3px); }
.bui-card:hover img { transform: scale(1.06); filter: saturate(1) brightness(1); }
.bui-card[aria-current="true"] img { filter: saturate(1) brightness(1); }
.bui-card[aria-current="true"]::after { box-shadow: inset 0 0 0 2px var(--gold); }
.bui-card[aria-current="true"] span::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold); vertical-align: 1px;
}

.bui-step { flex-shrink: 0; }
.bui-step svg { width: 20px; height: 20px; }

/* ---------- loading screen ---------- */
#preloadContainer.bui-loader {
  background: radial-gradient(120% 90% at 50% 40%, #232847 0%, var(--navy) 70%) var(--navy) !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  font-family: "BlissUI", "Montserrat", system-ui, sans-serif; color: #fff;
}
.bui-loader img { width: min(300px, 64vw); height: auto; animation: bui-breathe 2.4s ease-in-out infinite; }
.bui-loader .bar { width: 160px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bui-loader .bar::after { content: ""; display: block; width: 40%; height: 100%; background: var(--gold); animation: bui-slide 1.3s ease-in-out infinite; }
.bui-loader p { margin: 0; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
@keyframes bui-breathe { 50% { opacity: .7; } }
@keyframes bui-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .bui-shade.top { height: 150px; }
  /* phones: brand row on top, room title full width below it */
  .bui-top { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .bui-brand { justify-content: flex-end; }
  .bui-logo { margin-right: auto; }
  .bui-eyebrow { font-size: 9.5px; letter-spacing: .18em; gap: 7px; }
  .bui-eyebrow::before { width: 14px; }
  .bui-name { font-size: 20px; margin-top: 5px; }
  .bui-brand { gap: 8px; }
  .bui-logo { height: 26px; }
  .bui-sep { display: none; }
  .bui-icon { width: 36px; height: 36px; }
  .bui-icon svg { width: 16px; height: 16px; }
  .bui-step { display: none; }
  .bui-bottom { gap: 10px; padding-left: 0; padding-right: 0; }
  .bui-tab { padding: 7px 14px; font-size: 10.5px; }
  .bui-strip { gap: 9px; padding-left: 14px; padding-right: 14px; }
  .bui-card { width: 124px; height: 78px; border-radius: 12px; }
  .bui-card span { font-size: 11px; left: 9px; bottom: 7px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .bui-shade.bottom { height: 170px; }
  .bui-card { width: 120px; height: 70px; }
  .bui-bottom { gap: 8px; }
  .bui-logo { height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  #bui *, #bui *::before, #bui *::after { animation: none !important; transition: none !important; }
}
