/*
 * Virii8 Workspace Shell CSS module: v8-viewport-clock-overlap-fix-1638
 * Extracted from shell-core.css during v1.6.122 modular shell refactor.
 * Load order is controlled by V8E_Module_WorkspaceShell::enqueue_embedded_shell_assets().
 */
/* ---- v8-viewport-clock-overlap-fix-1638 ---- */
/* Virii8 v1.6.42 — upload gateway first, then AJAX/REST fallback. */
#v8-os-container {
  --v8-shell-bottom-reserve: 74px;
  --v8-mobile-panel-top: calc(42px + env(safe-area-inset-top, 0px));
  --v8-mobile-panel-bottom: calc(var(--v8-shell-bottom-reserve, 82px) + env(safe-area-inset-bottom, 0px) + 8px);
}
.v8-clock-display,
#v8-time-now,
#status-clock,
.v8-ss-clock-time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  white-space: nowrap;
  text-align: center;
  contain: content;
}
.v8-clock-display { min-width: 5.9em; display: inline-block; }
#v8-time-now { min-width: 7.8em; }
#status-clock { min-width: 5.9em; display: inline-block; }
.v8-device-phone .v8-clock-display { min-width: 5.2em; }

#v8e-admin-debug-tools {
  right: calc(max(12px, env(safe-area-inset-right, 0px)) + var(--v8-floating-ui-right-offset, 0px)) !important;
  bottom: calc(var(--v8-shell-bottom-reserve, 74px) + max(10px, env(safe-area-inset-bottom, 0px)) + var(--v8e-admin-btn-offset, 0px) + var(--v8e-admin-tools-y, 0px)) !important;
}
#v8e-admin-debug-tools.v8e-stacked .v8e-tool-trigger {
  position: relative !important;
  right: auto !important;
  bottom: auto !important;
}
#v8e-admin-debug-tools:not(.v8e-stacked) .v8e-tool-trigger {
  right: calc(max(12px, env(safe-area-inset-right, 0px)) + var(--v8-floating-ui-right-offset, 0px)) !important;
}
#v8e-admin-debug-tools:not(.v8e-stacked) #v8e-debug-trigger {
  bottom: calc(var(--v8-shell-bottom-reserve, 74px) + max(10px, env(safe-area-inset-bottom, 0px)) + var(--v8e-admin-btn-offset, 0px)) !important;
}
#v8e-admin-debug-tools:not(.v8e-stacked) #v8e-admin-trigger {
  bottom: calc(var(--v8-shell-bottom-reserve, 74px) + 42px + max(10px, env(safe-area-inset-bottom, 0px)) + var(--v8e-admin-btn-offset, 0px)) !important;
}
#v8e-debug-panel {
  bottom: calc(var(--v8-shell-bottom-reserve, 0px) + env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - var(--v8-shell-bottom-reserve, 0px) - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px) - 16px) !important;
}
#v8e-admin-panel {
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--v8-shell-bottom-reserve, 0px) - env(safe-area-inset-bottom, 0px) - 24px) !important;
}

.v8-device-phone .v8-window,
.v8-device-phone .v8-window.maximized {
  left: 0 !important;
  right: 0 !important;
  top: calc(34px + env(safe-area-inset-top, 0px)) !important;
  width: 100% !important;
  height: calc(100dvh - 34px - env(safe-area-inset-top, 0px) - var(--v8-shell-bottom-reserve, 82px) - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - 34px - env(safe-area-inset-top, 0px) - var(--v8-shell-bottom-reserve, 82px) - env(safe-area-inset-bottom, 0px)) !important;
  border-radius: 0 !important;
  transform: none !important;
  overflow: hidden !important;
}
.v8-device-phone .v8-window-body,
.v8-device-phone .v8-app-content,
.v8-device-phone .v8-app-layout {
  min-height: 0 !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}
.v8-device-phone .v8-status-panel,
.v8-device-phone .v8-start-menu,
.v8-device-phone .v8-shell-tools-popout,
.v8-device-phone .v8-command-palette-panel,
.v8-device-phone .v8-switcher {
  position: absolute !important;
  left: max(8px, env(safe-area-inset-left, 0px)) !important;
  right: max(8px, env(safe-area-inset-right, 0px)) !important;
  top: var(--v8-mobile-panel-top) !important;
  bottom: var(--v8-mobile-panel-bottom) !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px !important;
}
.v8-device-phone .v8-start-menu .v8-start-grid,
.v8-device-phone .v8-calendar-grid,
.v8-device-phone .v8-panel-card,
.v8-device-phone .v8-calendar-links-panel {
  max-width: 100%;
}
.v8-device-phone .v8-calendar-grid {
  overflow: auto;
}
.v8-device-phone .v8e-admin-grid,
.v8-device-phone .v8e-admin-row {
  grid-template-columns: 1fr !important;
  flex-direction: column;
  align-items: stretch;
}
@media (max-width: 640px) {
  #v8e-admin-panel {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    left: max(8px, env(safe-area-inset-left, 0px)) !important;
    right: max(8px, env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    max-height: calc(100dvh - var(--v8-shell-bottom-reserve, 72px) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px) !important;
  }
  #v8e-debug-panel {
    height: min(320px, calc(56dvh - var(--v8-shell-bottom-reserve, 72px) / 2)) !important;
  }
}
