/* =========================================================
   CREdocket — Litigation Tools click-through terms gate
   ========================================================= */

/* Blocks interaction with everything under the overlay, not just
   visual coverage -- see js/terms-gate.js. */
html.terms-gate-active body > *:not(.terms-gate-overlay) {
  pointer-events: none;
  user-select: none;
}

.terms-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--text-primary) 55%, transparent);
  backdrop-filter: blur(2px);
}

.terms-gate-modal {
  width: 100%;
  max-width: 620px;
  max-height: min(720px, 92vh);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  /* Was a hand-rolled 14px radius + a bespoke pure-black shadow recipe --
     the only other modal on the site (.auth-modal, styles.css) uses
     --radius-lg + --shadow-lg (a navy-tinted shadow matching the rest of
     the shadow scale). Two modals with two unrelated shape/shadow
     languages read as two different products; this makes them match. */
  border-radius: var(--radius-lg);
  padding: 28px 28px 22px;
  box-shadow: var(--shadow-lg);
}

.terms-gate-modal h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.terms-gate-scroll {
  flex: 1 1 auto;
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.terms-gate-scroll iframe {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: none;
  display: block;
}

.terms-gate-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 18px;
}
.terms-gate-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.terms-gate-checkbox a { color: var(--accent-deep); }

.terms-gate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.terms-gate-actions #terms-gate-accept:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .terms-gate-modal { padding: 22px 18px 18px; max-height: 94vh; }
  .terms-gate-actions { flex-direction: column-reverse; align-items: stretch; }
  .terms-gate-actions a, .terms-gate-actions button { text-align: center; }
}
