/* ============================================================
   TAD Core — entry gate + disclaimer bar
   Self-contained: brand tokens are mirrored here so the plugin
   works regardless of the active theme. Values match the locked
   white & gold system in /brand/tokens.css. White & gold only.
   ============================================================ */

.tad-gate,
.tad-disclaimer-bar {
  --tad-white: #FFFFFF;
  --tad-pearl: #FAF8F3;
  --tad-onyx: #1A1714;
  --tad-stone: #9A9384;
  --tad-line: #ECE6D8;
  --tad-champagne: #E6D6A6;
  --tad-gold: #C2A24C;
  --tad-gold-deep: #9A7B2E;
  --tad-body: #4B4636;
  --tad-font-display: 'Space Grotesk', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --tad-font-body: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --tad-gold-bar: linear-gradient(90deg, #E6D6A6, #C2A24C, #9A7B2E, #C2A24C, #E6D6A6);
}

/* --- Scroll lock while the gate is open ---------------------- */
body.tad-gate-locked {
  overflow: hidden !important;
}

/* --- Persistent disclaimer bar ------------------------------- */
.tad-disclaimer-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483000; /* below the gate, above site chrome */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 16px;
  background: var(--tad-onyx);
  border-bottom: 2px solid transparent;
  border-image: var(--tad-gold-bar) 1;
  text-align: center;
}

.tad-disclaimer-bar__text {
  font-family: var(--tad-font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tad-champagne);
  line-height: 1.4;
}

.tad-disclaimer-bar__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  transform: rotate(45deg);
  background: var(--tad-gold);
}

/* The WP admin bar (logged-in users) sits at the very top; nudge below it. */
.admin-bar .tad-disclaimer-bar {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .tad-disclaimer-bar { top: 46px; }
}

/* --- Entry gate / modal -------------------------------------- */
.tad-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483600; /* above everything, incl. disclaimer bar */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

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

.tad-gate.is-dismissing {
  opacity: 0;
  pointer-events: none;
}

.tad-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 23, 20, 0.82); /* onyx, translucent */
  backdrop-filter: blur(3px);
}

.tad-gate__panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--tad-white);
  border: 1px solid var(--tad-line);
  border-radius: 16px;
  padding: 40px 34px 28px;
  box-shadow: 0 30px 80px rgba(26, 23, 20, 0.45);
  text-align: center;
  overflow: hidden;
}

.tad-gate__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--tad-gold-bar);
}

.tad-gate__eyebrow {
  margin: 0 0 14px;
  font-family: var(--tad-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--tad-stone);
}

.tad-gate__title {
  margin: 0 0 16px;
  font-family: var(--tad-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--tad-onyx);
}

.tad-gate__body {
  margin: 0 0 26px;
  font-family: var(--tad-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--tad-body);
}

.tad-gate__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tad-gate__btn {
  font-family: var(--tad-font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 14px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tad-gate__btn--confirm {
  background: var(--tad-onyx);
  color: var(--tad-white);
  border-color: var(--tad-onyx);
}
.tad-gate__btn--confirm:hover {
  background: var(--tad-gold-deep);
  border-color: var(--tad-gold-deep);
}

.tad-gate__btn--decline {
  background: transparent;
  color: var(--tad-stone);
  border-color: var(--tad-line);
}
.tad-gate__btn--decline:hover {
  color: var(--tad-onyx);
  border-color: var(--tad-stone);
}

.tad-gate__btn:focus-visible {
  outline: 2px solid var(--tad-gold);
  outline-offset: 2px;
}

.tad-gate__fineprint {
  margin: 20px 0 0;
  font-family: var(--tad-font-body);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--tad-stone);
}

@media (max-width: 420px) {
  .tad-gate__panel { padding: 32px 22px 24px; }
  .tad-gate__title { font-size: 19px; }
}
