/* „Zobrazit jako“ (core/view-as.js, inc/view_as.php): fixed bar on top of every screen; the app moves down by its height (both skins, also inside the hub's iframe). */
:root { --va-h: 0px; }
:root.view-as { --va-h: 40px; }
.va-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500; height: calc(var(--va-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0;
  background: #b45309; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}
.va-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.va-text b { font-weight: 700; }
.va-sep { opacity: .7; }
.va-back {
  flex: none; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: #fff; color: #7c2d12; font: inherit; font-weight: 600; cursor: pointer;
}
.va-back:hover { background: #ffedd5; }
.va-back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.va-back:disabled { opacity: .7; cursor: progress; }

/* classic skin: sticky top bar and menu */
:root.view-as .app { padding-top: var(--va-h); }
:root.view-as .topbar { top: var(--va-h); }
:root.view-as .sidebar { top: var(--va-h); height: calc(100vh - var(--va-h)); height: calc(100dvh - var(--va-h)); }
/* Pendulum skin: fixed top bar across the whole width */
:root.view-as[data-skin="pendulum"] .app { padding-top: calc(var(--topbar-h) + var(--va-h) + env(safe-area-inset-top)); }
:root.view-as[data-skin="pendulum"] .sidebar { top: calc(var(--topbar-h) + var(--va-h) + env(safe-area-inset-top)); height: calc(100dvh - var(--topbar-h) - var(--va-h) - env(safe-area-inset-top)); }
@media (max-width: 1100px) { :root.view-as[data-skin="pendulum"] .sb-backdrop { inset: calc(var(--topbar-h) + var(--va-h) + env(safe-area-inset-top)) 0 0 0; } }
/* dialogs open below the bar, which stays visible and clickable above them */
:root.view-as .overlay { top: var(--va-h); }
@media print { .va-bar { display: none; } :root.view-as { --va-h: 0px; } }

/* picker in the user menu */
.va-pick .inp { width: 100%; margin-bottom: 10px; }
.va-list { display: flex; flex-direction: column; gap: 2px; max-height: min(52vh, 420px); overflow-y: auto; margin: 0 -6px; }
.va-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); text-align: left; cursor: pointer;
}
.va-item:hover, .va-item:focus-visible { background: var(--surface-2); }
.va-item.busy { opacity: .6; cursor: progress; }
.va-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.va-item .pill { flex: none; }
