/*
 * Standalone error-page subset of openhouse.scss.
 * It keeps the Openhouse container, main-color, and primary-button patterns
 * available when Rails cannot load fingerprinted asset bundles.
 */
:root {
  color-scheme: light;
  --oh-main: #3e7f83;
  --oh-secondary: #cfe5e3;
  --oh-event-btn-bg: #ffffff;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body.error-page-body {
  align-items: center;
  background: #f7fbfb;
  color: #343434;
  display: flex;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  justify-content: center;
  line-height: 1.625rem;
  margin: 0;
  min-height: 100vh;
  padding: 24px;
}

/* .container is the same layout primitive used by Openhouse pages. */
.error-page.container {
  margin: 0 auto;
  max-width: 650px;
  padding: 15px;
  text-align: center;
  width: 100%;
}

.error-page .text-primary,
.error-page .main-title-color { color: var(--oh-main); }

.error-page__status {
  align-items: center;
  background: #fff;
  border: 8px solid var(--oh-secondary);
  border-radius: 50%;
  color: var(--oh-main);
  display: flex;
  font-size: clamp(2.5rem, 10vw, 4.25rem);
  font-weight: 700;
  height: 2.35em;
  justify-content: center;
  letter-spacing: -.06em;
  margin: 0 auto 20px;
  width: 2.35em;
}

.error-page__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.35;
  margin: 0;
}

.error-page__message {
  font-size: 1.05rem;
  margin: 14px auto 28px;
  max-width: 36em;
}

/* Static counterpart of the Openhouse .btn.btn-primary component. */
.error-page .btn {
  border: 1px solid transparent;
  border-radius: 4px;
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  padding: .7em 1.8em;
  text-decoration: none;
}

.error-page .btn.btn-primary {
  background-color: var(--oh-main);
  border-color: var(--oh-main);
  color: #fff;
}

.error-page .btn.btn-primary:focus,
.error-page .btn.btn-primary:hover {
  background-color: var(--oh-main);
  border-color: var(--oh-main);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--oh-main) 50%, transparent);
  color: #fff;
  outline: 3px solid #000;
  outline-offset: 3px;
}

.error-page--unprocessable .error-page__message { white-space: nowrap; }

@media (max-width: 480px) {
  body.error-page-body { padding: 20px; }
  .error-page__status { border-width: 6px; }
  .error-page--unprocessable .error-page__message { white-space: normal; }
}
