/* Critical iframe-mode styles applied before any CSS bundle loads. */
html.iframe-app-switcher-root,
html.iframe-app-switcher-root body {
  margin: 0;
  padding: 0;
  background: transparent !important;
  overflow: visible;
}

html.iframe-app-switcher-root #root {
  min-height: 0;
}

/* Compact loader for the auth-check phase inside non-header iframes.
   Anchored to the top-right corner where the trigger will appear. */
html.iframe-app-switcher-root:not(.iframe-header-boot) .loading-comp {
  position: fixed;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

html.iframe-app-switcher-root:not(.iframe-header-boot) .loading-comp .spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

/* Header iframe: static skeleton matching AppSwitcher + profile triggers. */
html.iframe-header-boot .iframe-header--skeleton {
  position: fixed;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin: 0;
  background: transparent;
  pointer-events: none;
  user-select: none;
}

html.iframe-header-boot .iframe-header--skeleton .app-switcher-trigger,
html.iframe-header-boot .iframe-header--skeleton .profile-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  color: #5b616b;
}

html.iframe-header-boot .iframe-header--skeleton .profile-menu-trigger {
  border-radius: 50%;
}

html.iframe-header-boot .iframe-header--skeleton .iframe-header__avatar-skeleton {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #cacdd1;
  animation: iframe-header-avatar-pulse 1.4s ease-in-out infinite;
}

@keyframes iframe-header-avatar-pulse {
  0%,
  100% {
    background-color: #cacdd1;
  }

  50% {
    background-color: #e0e2e6;
  }
}

html.iframe-header-boot .iframe-header--skeleton .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
