/* Element defaults. Layout helpers are in utilities.css. */
@layer reset {

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  /* No rubber-band bounce on iPad: the page would drag the sticky header along. */
  overscroll-behavior-y: none;
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--topbar-height) + 0.5rem);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  overflow-x: clip;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
}

/* An open Modal locks the page underneath (ModalWindow.razor.js). */
html.en-modal-open {
  overflow: hidden;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]) {
  cursor: pointer;
}

a {
  color: var(--accent-600);
}

a:hover {
  color: var(--accent-700);
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  font-weight: 600;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

/* No prerender: until WebAssembly starts, App.razor shows a placeholder; it hides once the shell is drawn. */
#app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  color: var(--primary-500);
}

body:has(.en-shell) #app-loading,
body:has(.en-bare) #app-loading {
  display: none;
}

#blazor-error-ui {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1000;
  padding: 0.75rem 3.5rem 0.75rem 1rem;
  background: var(--error-600);
  color: var(--white);
}

#blazor-error-ui a {
  color: inherit;
}

#blazor-error-ui .reload {
  margin-left: 0.5rem;
  text-decoration: underline;
}

#blazor-error-ui .dismiss {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  background: none;
  border: none;
}
}
