/* Shared critical presentation: React, pre-React HTML and standalone error responses. */
.vk-fullscreen-state {
  position: fixed;
  z-index: 1000;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  overflow: auto;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  color: var(--vk-text-background, #2a241e);
  font: 400 14px/1.5 var(--vk-font-ui, "Segoe UI", sans-serif);
  text-align: center;
  background: var(--vk-app-surface-center, #f6f1e9);
}

.vk-fullscreen-state[hidden] {
  display: none;
}

.vk-fullscreen-state [hidden] {
  display: none;
}

.vk-fullscreen-state-content {
  display: grid;
  flex: 0 0 auto;
  gap: var(--vk-space-6, 24px);
  justify-items: center;
  width: min(100%, 560px);
  margin: auto;
  overflow-wrap: anywhere;
}

.vk-fullscreen-state-logo {
  display: block;
  width: 112px;
  height: 112px;
  background: currentcolor;
  mask: url("/static/shared/img/favicons/favicon.svg") center / contain no-repeat;
}

.vk-fullscreen-state-title {
  margin: 0;
  color: inherit;
  font-size: var(--vk-font-size-title, 18px);
  font-weight: var(--vk-font-weight-bold, 600);
  line-height: 1.4;
}

/* HTML retains dormant nodes for the pre-React loading -> waiting/error observer. */

.vk-fullscreen-state-loading-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.vk-fullscreen-state:not([data-fullscreen-state="loading"]) .vk-fullscreen-state-loading-label {
  display: none;
}

.vk-fullscreen-state-title:focus {
  outline: none;
}

.vk-fullscreen-state-description {
  margin: 12px 0 0;
}

.vk-fullscreen-state-exit {
  box-sizing: border-box;
  display: inline-flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 20px;
  border-radius: var(--vk-radius-control, 8px);
  color: var(--vk-app-accent-main-text, #111);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  background: var(--vk-app-accent-main, #ec7805);
  box-shadow: none;
  transform: none;
}

.vk-fullscreen-state-exit:focus-visible {
  outline: 2px solid var(--vk-app-accent-current, #057c92);
  outline-offset: 4px;
}

.vk-fullscreen-state[data-fullscreen-state="loading"] .vk-fullscreen-state-title,
.vk-fullscreen-state[data-fullscreen-state="loading"] .vk-fullscreen-state-description,
.vk-fullscreen-state[data-fullscreen-state="loading"] .vk-fullscreen-state-exit,
.vk-fullscreen-state[data-fullscreen-state="waiting"] .vk-fullscreen-state-title {
  display: none;
}

.vk-fullscreen-state[data-fullscreen-state="waiting"] .vk-fullscreen-state-exit {
  color: var(--vk-text-background, #2a241e);
  background: var(--vk-paper-button-bg, #fbf8f3);
}

.vk-fullscreen-state[data-fullscreen-state="waiting"] .vk-fullscreen-state-exit:hover {
  background: var(
    --vk-paper-button-bg-hover,
    color-mix(in srgb, var(--vk-text-background, #2a241e) 9%, var(--vk-paper-button-bg, #fbf8f3))
  );
}

.vk-fullscreen-state-spinner {
  box-sizing: border-box;
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  border: 3px solid currentcolor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: vk-fullscreen-spin 1s linear infinite;
}

@keyframes vk-fullscreen-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vk-fullscreen-state-spinner {
    animation: none;
  }

  .vk-fullscreen-state-exit {
    transition: none;
  }
}
