.rk-cookie-dialog,
.rk-cookie-footer,
.rk-cookie-choice,
.rk-cookie-close {
  font-family: Inter, "Noto Sans TC", "Noto Sans Devanagari", sans-serif;
}

.rk-cookie-dialog {
  position: fixed;
  /* Above site chrome (header/footer z-index ~40–60) and the Ask me pill
     (2147483000). The pill is also hidden while this panel is open. */
  z-index: 2147483642;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(76px + max(12px, env(safe-area-inset-bottom, 0px)));
  max-width: 36rem;
  margin: 0 auto;
  max-height: min(70dvh, 32rem);
  overflow: auto;
  padding: 0.85rem 0.9rem 0.8rem;
  color: #f5f5f5;
  background: #070707;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.rk-cookie-dialog[hidden] { display: none !important; }

.rk-cookie-title {
  margin: 0 4.75rem 0.35rem 0;
  font-size: 1rem;
  font-weight: 600;
}
.rk-cookie-title:focus { outline: none; }

.rk-cookie-more { margin: 0 0 0.7rem; }
.rk-cookie-more summary {
  cursor: pointer;
  color: #0abab5;
  font-size: 0.82rem;
}
.rk-cookie-more summary:focus-visible {
  outline: 2px solid #0abab5;
  outline-offset: 2px;
}
.rk-cookie-more p {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #d7d7d7;
}

.rk-cookie-body,
.rk-cookie-signal,
.rk-cookie-state,
.rk-cookie-row span {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #d7d7d7;
}

.rk-cookie-signal { color: #f0d9b0; }

.rk-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.rk-cookie-choice,
.rk-cookie-footer {
  appearance: none;
  border: 1px solid rgba(10, 186, 181, 0.55);
  background: #000;
  color: #f5f5f5;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.rk-cookie-choice {
  flex: 1 1 8.5rem;
  min-height: 44px;
}

.rk-cookie-choice:focus-visible,
.rk-cookie-footer:focus-visible,
.rk-cookie-close:focus-visible,
.rk-cookie-row input:focus-visible {
  outline: 2px solid #0abab5;
  outline-offset: 2px;
}

.rk-cookie-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: auto;
  min-width: 44px;
  height: 44px;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.rk-cookie-custom { margin: 0 0 0.7rem; }
.rk-cookie-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0 0 0.45rem;
}
.rk-cookie-row strong { display: block; color: #f5f5f5; }
.rk-cookie-row span { display: block; }

.rk-cookie-footer {
  margin-left: 0.55rem;
  min-height: 44px;
}

@media (max-width: 640px) {
  .rk-cookie-dialog { left: 12px; right: 12px; }
  .rk-cookie-dialog { bottom: calc(84px + max(12px, env(safe-area-inset-bottom, 0px))); padding: 0.75rem 0.8rem 0.75rem; }
  .rk-cookie-choice { flex: 1 1 calc(50% - 0.45rem); min-width: 0; padding: 0.5rem 0.6rem; }
  .rk-cookie-body { margin-bottom: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rk-cookie-dialog { scroll-behavior: auto; }
}

/* 2026-11-10: compact bottom bar so the notice never covers the headline. */
.rk-cookie-dialog {
  left: max(8px, env(safe-area-inset-left, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  max-width: 46rem;
  max-height: min(60dvh, 26rem);
  padding: 0.55rem 0.7rem 0.6rem;
  border-color: rgba(10, 186, 181, 0.35);
}
.rk-cookie-title {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rk-cookie-body { margin: 0 4.2rem 0.35rem 0; font-size: 0.8rem; line-height: 1.35; }
.rk-cookie-more { margin: 0 0 0.45rem; }
.rk-cookie-more summary { font-size: 0.78rem; }
.rk-cookie-privacy { display: inline-block; margin-top: 0.35rem; color: #0abab5; font-size: 0.8rem; text-decoration: underline; }
.rk-cookie-actions { flex-wrap: nowrap; gap: 0.4rem; }
.rk-cookie-choice { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0.4rem 0.5rem; font-size: 0.78rem; }
.rk-cookie-close { top: 0.35rem; right: 0.4rem; height: 36px; min-width: 36px; padding: 0 0.6rem; font-size: 0.75rem; }
@media (max-width: 640px) {
  .rk-cookie-dialog { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom, 0px)); padding: 0.5rem 0.6rem 0.55rem; }
  .rk-cookie-choice { flex: 1 1 0; padding: 0.4rem 0.35rem; }
  .rk-cookie-body { margin-bottom: 0.3rem; }
}

/* Hide the Ask me launcher while Cookie settings is open so it cannot
   cover Customize / OK / Necessary only / Close on phones. */
html.rk-cookie-open .rk-help-launcher,
html.rk-cookie-open .rk-help-panel,
html.rk-cookie-open .rk-help-tail {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
