/* ReflexBenchmark cookie consent — uses the site's own CSS variables (see style.css) */
.rb-cc, .rb-cc-overlay { font-family: inherit; color: var(--ink, #15191C); box-sizing: border-box; }
.rb-cc *, .rb-cc-overlay * { box-sizing: border-box; }
.rb-cc-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Non-modal fixed card (bottom-left on desktop, top sheet on phones): never shifts page layout */
.rb-cc {
  position: fixed; z-index: 10000;
  left: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card, #FAFBF8); border: 1px solid var(--line, #D8DCD3); border-radius: 14px;
  box-shadow: 0 8px 32px rgba(21, 25, 28, .22); padding: 14px 16px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.rb-cc[hidden] { display: none; }
.rb-cc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.rb-cc-title, .rb-cc-dhead h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; }
.rb-cc-dhead h2 { margin-bottom: 6px; }

/* Visible dismiss-without-consent button (text + icon, not an icon alone) */
.rb-cc-dismiss { appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink, #15191C); background: transparent; border: 1px solid var(--line, #D8DCD3); border-radius: 8px; min-height: 32px; padding: 4px 10px; white-space: nowrap; }
.rb-cc-dismiss:hover { background: rgba(21, 25, 28, .06); }

.rb-cc-text, .rb-cc-sec p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.rb-cc-inline a { margin-right: 10px; white-space: nowrap; }
.rb-cc-links, .rb-cc-links a { font-size: 12px; }
.rb-cc-links { margin: 8px 0 0; display: flex; gap: 14px; }
.rb-cc-links a, .rb-cc a { color: var(--signal-text, #D43900); text-decoration: underline; }
.rb-cc-msg { margin: 8px 0 0; font-size: 12px; }
.rb-cc-msg:empty { display: none; }

/* Allow and Reject are visually identical (equal prominence); Manage is a quieter outline */
.rb-cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rb-cc-actions .rb-cc-btn-secondary { grid-column: 1 / -1; }
.rb-cc-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  min-height: 44px; padding: 10px 14px; border-radius: 10px;
  background: var(--ink, #15191C); color: var(--bg, #F0F2EC); border: 2px solid var(--ink, #15191C);
}
.rb-cc-btn-secondary { background: transparent; color: var(--ink, #15191C); }
.rb-cc-btn:hover { filter: brightness(1.15); }
.rb-cc-btn-secondary:hover { background: rgba(21, 25, 28, .06); filter: none; }
.rb-cc-btn:focus-visible, .rb-cc-dismiss:focus-visible, .rb-cc-x:focus-visible, .rb-cc a:focus-visible, .rb-cc-dialog:focus-visible,
.rb-cc-switch input:focus-visible + .rb-cc-slider { outline: 3px solid var(--focus, #2D5BFF); outline-offset: 2px; }
.rb-cc-dialog:focus { outline: none; }

/* Preferences dialog */
.rb-cc-overlay {
  position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center;
  background: rgba(21, 25, 28, .55); padding: 16px; overscroll-behavior: contain;
}
.rb-cc-overlay[hidden] { display: none; }
.rb-cc-dialog {
  width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card, #FAFBF8); border: 1px solid var(--line, #D8DCD3); border-radius: 16px; padding: 20px;
  box-shadow: 0 16px 48px rgba(21, 25, 28, .35);
}
.rb-cc-dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rb-cc-x { appearance: none; cursor: pointer; border: 0; background: transparent; color: inherit; font-size: 28px; line-height: 1; width: 44px; height: 44px; border-radius: 10px; margin: -8px -8px 0 0; }
.rb-cc-x:hover { background: rgba(21, 25, 28, .08); }
.rb-cc-sec { border-top: 1px solid var(--line, #D8DCD3); padding: 12px 0 4px; margin-top: 8px; }
.rb-cc-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.rb-cc-sec h3 { margin: 0; font-size: 14px; font-weight: 700; }
.rb-cc-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(0, 135, 95, .12); color: var(--memory-text, #00815C); white-space: nowrap; }
.rb-cc-actions-d { margin-top: 14px; grid-template-columns: repeat(3, 1fr); }

/* Switch (native checkbox underneath => keyboard + screen-reader support) */
.rb-cc-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; }
.rb-cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.rb-cc-switch input:disabled { cursor: not-allowed; }
.rb-cc-slider { position: absolute; inset: 0; border-radius: 999px; background: #8A9189; transition: background .15s; }
.rb-cc-slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; }
.rb-cc-switch input:checked + .rb-cc-slider { background: var(--memory, #00875F); }
.rb-cc-switch input:checked + .rb-cc-slider::before { transform: translateX(20px); }
.rb-cc-switch input:disabled + .rb-cc-slider { opacity: .5; }

@media (prefers-reduced-motion: reduce) { .rb-cc-slider, .rb-cc-slider::before { transition: none; } }

@media (max-width: 640px) {
  /* Compact sheet pinned to the TOP (just below the sticky header and any breadcrumb bar — consent.js sets `top`),
     so it does not sit on the test stage / Start button in the lower part of the screen.
     All explanatory text stays visible; only spacing and sizes are reduced. */
  .rb-cc { left: 0; right: 0; top: 0; bottom: auto; width: auto; max-height: 45vh; border-radius: 0 0 12px 12px; border-width: 0 0 1px 0; padding: 6px 10px; box-shadow: 0 4px 18px rgba(21, 25, 28, .2); }
  .rb-cc-head { margin-bottom: 0; }
  .rb-cc-title { font-size: 13.5px; }
  .rb-cc-dismiss { font-size: 11.5px; min-height: 28px; padding: 1px 8px; }
  .rb-cc-text { font-size: 11.5px; line-height: 1.32; margin: 2px 0 5px; }
  .rb-cc-inline a { margin-right: 8px; }
  .rb-cc-actions { grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
  .rb-cc-actions .rb-cc-btn-secondary { grid-column: auto; }
  .rb-cc-btn { min-height: 40px; font-size: 12px; line-height: 1.15; padding: 3px 4px; border-radius: 8px; }
  .rb-cc-msg { font-size: 11.5px; margin-top: 4px; }
  .rb-cc-overlay { align-items: flex-end; padding: 8px; }
  .rb-cc-dialog { padding: 16px; max-height: calc(100dvh - 16px); }
  .rb-cc-actions-d { grid-template-columns: 1fr; }
  .rb-cc-dialog .rb-cc-btn { min-height: 44px; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
}
