/* Gate akses bersama untuk pengguna non-premium saat pemuatan iklan diblokir. */
html.bd-access-gate-open,
html.bd-access-gate-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.bd-access-gate-open #card-scroll-area {
  overflow: hidden !important;
}

.bd-access-gate[hidden] {
  display: none !important;
}

.bd-access-gate {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: clamp(0.75rem, 2.5vw, 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #0f172a;
  background: #2864e8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bd-access-gate__card {
  width: min(100%, 49rem);
  max-height: calc(100dvh - clamp(1.5rem, 5vw, 3rem));
  box-sizing: border-box;
  padding: clamp(2.1rem, 6vh, 5.8rem) clamp(1.4rem, 6vw, 4rem) clamp(1.65rem, 4.5vh, 3.5rem);
  overflow-y: auto;
  border: 1px solid #dce4ef;
  border-radius: clamp(1.75rem, 5vw, 3.2rem);
  text-align: center;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.bd-access-gate__warning {
  width: clamp(3.7rem, 9vw, 5.25rem);
  height: auto;
  margin: 0 auto clamp(1.7rem, 5vh, 4.2rem);
  color: #d96e00;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bd-access-gate h2 {
  margin: 0;
  color: #0b1328;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.bd-access-gate__description {
  max-width: 43rem;
  margin: clamp(1rem, 2.6vh, 1.45rem) auto 0;
  color: #3d4b63;
  font-size: clamp(0.98rem, 2.4vw, 1.42rem);
  font-weight: 450;
  line-height: 1.55;
}

.bd-access-gate__divider {
  width: 100%;
  height: 1px;
  margin: clamp(1.55rem, 4.2vh, 3.25rem) 0 clamp(1.45rem, 3.7vh, 2.55rem);
  background: #d6dde7;
}

.bd-access-gate__instruction {
  max-width: 41rem;
  margin: 0 auto;
  color: #46546b;
  font-size: clamp(0.98rem, 2.35vw, 1.35rem);
  font-weight: 750;
  line-height: 1.55;
}

.bd-access-gate__retry {
  width: 100%;
  min-height: clamp(3.75rem, 8vh, 6.45rem);
  margin-top: clamp(1.65rem, 4.5vh, 3.35rem);
  border: 0;
  border-radius: clamp(1rem, 3vw, 1.75rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  color: #ffffff;
  background: #2864e8;
  box-shadow: 0 12px 28px rgba(40, 100, 232, 0.22);
  font: inherit;
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}

.bd-access-gate__retry:hover {
  background: #1f56d2;
  box-shadow: 0 14px 34px rgba(40, 100, 232, 0.3);
}

.bd-access-gate__retry:active {
  transform: translateY(2px);
}

.bd-access-gate__retry:focus-visible {
  outline: 4px solid rgba(37, 99, 235, 0.28);
  outline-offset: 4px;
}

.bd-access-gate__retry:disabled {
  cursor: wait;
  opacity: 0.76;
}

.bd-access-gate__retry svg {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bd-access-gate__retry.is-checking svg {
  animation: bd-access-gate-spin 700ms linear infinite;
}

.bd-access-gate__status {
  min-height: 1.35em;
  margin: 0.75rem 0 -0.75rem;
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

@keyframes bd-access-gate-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .bd-access-gate {
    padding: 0.65rem;
  }

  .bd-access-gate__card {
    max-height: calc(100dvh - 1.3rem);
    padding: 2rem 1.25rem 1.35rem;
    border-radius: 1.8rem;
  }

  .bd-access-gate__warning {
    width: 3.15rem;
    margin-bottom: 1.65rem;
  }

  .bd-access-gate h2 {
    font-size: 1.28rem;
    line-height: 1.2;
  }

  .bd-access-gate__description {
    margin-top: 0.8rem;
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .bd-access-gate__divider {
    margin-top: 1.2rem;
    margin-bottom: 1.1rem;
  }

  .bd-access-gate__instruction {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .bd-access-gate__retry {
    gap: 0.7rem;
    min-height: 3.35rem;
    margin-top: 1.3rem;
    border-radius: 0.95rem;
    font-size: 0.98rem;
  }

  .bd-access-gate__retry svg {
    width: 1.55rem;
    height: 1.55rem;
  }

  .bd-access-gate__status {
    margin-top: 0.55rem;
    font-size: 0.72rem;
  }
}

@media (max-height: 680px) {
  .bd-access-gate__card {
    padding-top: 1.6rem;
    padding-bottom: 1.15rem;
  }

  .bd-access-gate__warning {
    width: 3.3rem;
    margin-bottom: 1rem;
  }

  .bd-access-gate__divider {
    margin-top: 1.15rem;
    margin-bottom: 1.05rem;
  }

  .bd-access-gate__retry {
    min-height: 3.4rem;
    margin-top: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-access-gate__retry {
    transition: none;
  }
}
