/* Member code gate (client side).
   Gated content is hidden by default and only shown once the page has the
   ng-unlocked class. The class is set by a tiny script in the head, before
   the page paints, so there is no flash of gated content. */

html:not(.ng-unlocked) [data-gated] {
  display: none !important;
}

html.ng-unlocked .gate-box {
  display: none !important;
}

.gate-box {
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #111;
}

.gate-inner {
  width: min(32rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.gate-title {
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.gate-text {
  margin: 0 0 1rem;
  color: #555;
}

.gate-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.gate-code {
  display: block;
  width: 100%;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.85rem;
  border-radius: 0;
}

.gate-submit {
  background: #1E7A3A;
  color: #fff;
  border: 1px solid #1E7A3A;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  border-radius: 0;
}

.gate-submit:hover,
.gate-submit:focus-visible {
  background: #fff;
  color: #1E7A3A;
}

.gate-error {
  margin: 0.85rem 0 0;
  color: #b00020;
  font-weight: 600;
}

.gate-error[hidden] {
  display: none;
}

/* Full page prompt (gated pages) */
.gate-full {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.gate-full .gate-inner {
  border: 1px solid #ddd;
  padding: 2rem 1.75rem;
}

.gate-full .gate-title {
  font-size: 1.75rem;
}

/* Small box (members area on the home page) */
.gate-small {
  padding: 2.5rem 0;
  border-top: 1px solid #ddd;
}

.gate-small .gate-inner {
  border: 1px solid #ddd;
  padding: 1.25rem 1.5rem;
  margin-inline: auto;
}

.gate-small .gate-title {
  font-size: 1.15rem;
}

@media (min-width: 720px) {
  .gate-small .gate-inner {
    width: min(960px, calc(100% - 2.5rem));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 2rem;
    align-items: start;
  }

  .gate-small .gate-title,
  .gate-small .gate-text {
    grid-column: 1;
  }

  .gate-small .gate-form {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* Standalone NG Form page: center the prompt */
body > .gate-full {
  min-height: 100vh;
  padding: 1.5rem 0;
}
