.hf-access-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hf-access-gate.hidden {
  display: none !important;
}

.hf-access-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 12, 0.78);
  backdrop-filter: blur(8px);
}

.hf-access-gate__panel {
  position: relative;
  width: min(100%, 24rem);
  padding: 1.2rem 1.05rem 1.05rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  border: 1px solid rgba(26, 16, 12, 0.1);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.hf-access-gate__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(183, 28, 28, 0.12));
  color: #e65100;
  font-size: 1.7rem !important;
}

.hf-access-gate__title {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a100c;
}

.hf-access-gate__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #64748b;
}

.hf-access-gate__text strong {
  color: #ea580c;
}

.hf-access-gate__checks {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.hf-access-gate__check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.62rem 0.68rem;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.hf-access-gate__check.is-ok {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.18);
}

.hf-access-gate__check.is-denied {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
}

.hf-access-gate__check.is-retrying {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.hf-access-gate__check.is-attention {
  animation: hf-access-attention 0.45s ease-in-out 2;
}

@keyframes hf-access-attention {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.hf-access-gate__check-icon {
  color: #ea580c;
  font-size: 1.25rem !important;
}

.hf-access-gate__check.is-ok .hf-access-gate__check-icon {
  color: #059669;
}

.hf-access-gate__check.is-denied .hf-access-gate__check-icon {
  color: #dc2626;
}

.hf-access-gate__check-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.hf-access-gate__check-copy strong {
  font-size: 0.76rem;
  color: #1a100c;
}

.hf-access-gate__check-copy span {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.35;
}

.hf-access-gate__check-state {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
}

.hf-access-gate__check.is-ok .hf-access-gate__check-state {
  color: #059669;
}

.hf-access-gate__check.is-denied .hf-access-gate__check-state {
  color: #dc2626;
}

.hf-access-gate__hint {
  margin: 0.7rem 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: #94a3b8;
}

.hf-access-gate__actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.hf-access-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.65rem 0.85rem;
  border: 0;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
}

.hf-access-gate__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hf-access-gate__btn.is-busy {
  opacity: 0.85;
  pointer-events: none;
}

.hf-access-gate__btn.is-busy .hf-access-gate__btn-label::after {
  content: '…';
}

.hf-access-gate__btn--primary {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.24);
}

.hf-access-gate__btn--secondary {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

body.hf-access-blocked {
  overflow: hidden;
}

body.hf-access-blocked .hf-nav,
body.hf-access-blocked .hf-main,
body.hf-access-blocked .hf-footer,
body.hf-access-blocked .hf-bottomtabs,
body.hf-access-blocked .hf-pwa-install,
body.hf-access-blocked .hf-pwa-update {
  pointer-events: none;
  user-select: none;
}

/* Legacy location gate (unused) */
.hf-loc-gate.hidden {
  display: none !important;
}

body.hf-loc-blocked {
  overflow: hidden;
}
