html,
body {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

.status-bar-safe-area {
  flex-shrink: 0;
  height: env(safe-area-inset-top, 0px);
  background: var(--bs-body-bg);
}

#app {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-shell,
#app > * {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

html.maui-ios .status-bar-safe-area {
  display: none;
}

html.maui-ios #app {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  flex: none;
  height: auto;
}

#blazor-error-ui {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  padding: 12px 16px;
  background: #1a1a2e;
  color: #faf7f2;
  font-size: 14px;
}

#blazor-error-ui .dismiss {
  float: right;
  cursor: pointer;
}

#blazor-error-ui .reload {
  color: #e07a5f;
}

.app-boot {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #6b6578;
  font-size: 15px;
  font-weight: 600;
}

.app-boot__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(var(--color-primary-rgb), 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: app-boot-spin 0.8s linear infinite;
}

@keyframes app-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

.debug-error-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 20px 16px;
  background: #fff5f5;
}

.debug-error-panel__title {
  font-size: 16px;
  font-weight: 800;
  color: #c43d5c;
  margin-bottom: 12px;
}

.debug-error-panel__message,
.debug-error-panel__stack {
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
  border: 1px solid rgba(196, 61, 92, 0.25);
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}

.debug-error-panel__details {
  margin-top: 12px;
}

@media (min-width: 768px) {
  html {
    font-size: 17px;
  }

  .auth-page,
  .profile-page,
  .chats-page,
  .my-meets-page,
  .afisha-page {
    max-width: 640px;
    margin-inline: auto;
    width: 100%;
  }

  .auth-title {
    font-size: var(--text-xl, 24px);
    max-width: 420px;
  }

  .auth-subtitle {
    max-width: 420px;
  }
}
