/* ==========================================================================
   RBI Guidelines notice (native <dialog>)
   ========================================================================== */

.rbi-modal {
  width: 100%;
  max-width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-ink);
  overflow: visible;
}

.rbi-modal::backdrop {
  background: rgba(20, 20, 20, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.rbi-modal[open] {
  animation: rbi-in 0.55s var(--ease-out) both;
}

.rbi-modal[open]::backdrop {
  animation: rbi-fade-in 0.4s ease both;
}

.rbi-modal.is-closing {
  animation: rbi-out 0.22s ease-in both;
}

.rbi-modal.is-closing::backdrop {
  animation: rbi-fade-out 0.22s ease-in both;
}

.rbi-card {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 40px 32px 28px;
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
  box-shadow:
    0 40px 100px -30px rgba(20, 20, 20, 0.5),
    0 0 0 1px rgba(20, 20, 20, 0.05);
}

/* The card receives initial focus so screen readers start at the heading;
   it is not interactive, so no ring is drawn on it. */
.rbi-card:focus {
  outline: none;
}

/* Red accent bar */
.rbi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 64px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--c-red);
  translate: -50% 0;
}

/* Faint red wash at the base of the card */
.rbi-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: radial-gradient(70% 100% at 50% 100%, rgba(216, 38, 26, 0.07), transparent 70%);
  pointer-events: none;
}

.rbi-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border: 1px solid var(--c-red-100);
  border-radius: 16px;
  background: var(--c-red-50);
  color: var(--c-red);
  font-size: 1.4rem;
}

.rbi-kicker {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rbi-title {
  margin: 6px 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.rbi-body {
  margin-top: 14px;
  color: var(--c-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.rbi-body p {
  margin: 0;
}

.rbi-body p + p {
  margin-top: 10px;
}

.rbi-ack {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 28px;
}

.rbi-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.rbi-close:hover {
  background: var(--c-bg-soft);
  color: var(--c-ink);
}

@media (max-width: 479.98px) {
  .rbi-card {
    padding: 36px 22px 22px;
  }

  .rbi-title {
    font-size: 1.4rem;
  }
}

@keyframes rbi-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes rbi-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(8px) scale(0.98); }
}

@keyframes rbi-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes rbi-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
