/*
 * The block page and the banner, chosen by `browser-check.js`'s verdict on <html data-browser>.
 * Plain CSS in the shell's light colours, so the block page renders in browsers the app's own
 * stylesheet does not reach. It shows unless a verdict lets the browser through.
 */

.browser-block {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  overflow-y: auto;
  background: #f7f7fa;
  color: #17181c;
  font-family:
    "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  text-align: center;
}

html[data-browser="chrome"] .browser-block,
html[data-browser="edge-or-safari"] .browser-block {
  display: none;
}

.browser-block-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 432px;
  margin: auto;
  padding: 48px 24px;
}

.browser-block-card img {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto;
}

.browser-block-card h1 {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.025em;
}

.browser-block-card p {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.625;
}

.browser-block-card a {
  display: block;
  margin-top: 32px;
  padding: 8px 16px;
  border-radius: 4px;
  background: #4747bf;
  color: #fafafa;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

.browser-block-card a:hover {
  opacity: 0.9;
}

.browser-block-card a:focus-visible {
  outline: 2px solid #5b5bd6;
  outline-offset: 2px;
}

/* Download is the default; Chrome below the floor is told to update instead. */
.browser-block-update {
  display: none;
}

html[data-browser="chrome-outdated"] .browser-block-update {
  display: block;
}

html[data-browser="chrome-outdated"] .browser-block-download {
  display: none;
}

/* The banner sits above the app and takes its height from it, on the app's own tokens. */
.browser-banner {
  display: none;
}

@media screen {
  html[data-browser="edge-or-safari"] body {
    display: flex;
    flex-direction: column;
  }

  html[data-browser="edge-or-safari"] #root {
    flex: 1 1 0;
    min-height: 0;
  }

  html[data-browser="edge-or-safari"] .browser-banner {
    display: block;
    flex: none;
    margin: 0;
    padding: 6px 16px;
    border-bottom: 1px solid var(--color-border-default, #e8e9ef);
    background: var(--color-bg-surface, #ffffff);
    color: var(--color-fg-secondary, #6b7280);
    font-family: var(--font-sans, sans-serif);
    font-size: 12px;
    line-height: 16px;
    text-align: center;
  }
}
