/* Rite Maps cookie notice (contract v6): a slim light notice. Wide screens: a compact card bottom-left (under 120px tall).
   Phones (640px and under): a short bar across the bottom with the two buttons side by side.
   Stacking: the quote pop-up is a modal <dialog> in the browser's top layer, so it's always above this; this notice sits above the
   chat panel and launcher (keep those below --rm-z-cookie, 9000). While it shows, <html> carries --rm-cookie-offset (the space it
   takes at the bottom of the window) and .rm-cookie-open. On wide screens the script may move the card right with
   --rm-cookie-left so it doesn't cover the hero's buttons (see rmt.js). Uses the theme's --rm-* tokens with the contract's hex
   fallbacks. */

:root { --rm-z-cookie: 9000; }

.rm-cookie {
  position: fixed; left: var(--rm-cookie-left, 24px); bottom: 24px; z-index: var(--rm-z-cookie, 9000);
  box-sizing: border-box; width: min(436px, calc(100% - 48px)); max-height: calc(100vh - 48px); overflow-y: auto; margin: 0;
  padding: 10px 16px 12px;
  background: var(--rm-white, #ffffff); color: var(--rm-text, #111827);
  border: 1px solid var(--rm-line, #d9dee7); border-top: 3px solid var(--rm-blue, #05357e); border-radius: 10px;
  box-shadow: 0 18px 48px -22px rgba(5, 30, 70, .42), 0 2px 6px rgba(5, 30, 70, .06);
  font: 400 .875rem/1.45 var(--rm-font-body, "Barlow", system-ui, sans-serif); text-align: left;
  animation: rm-cookie-in .25s cubic-bezier(.2, .8, .2, 1) both;
}
.rm-cookie[hidden] { display: none !important; }
.rm-cookie *, .rm-cookie *::before, .rm-cookie *::after { box-sizing: border-box; }
.rm-cookie:focus { outline: none; }
.rm-cookie:focus-visible { outline: 2px solid var(--rm-blue, #05357e); outline-offset: 3px; }
.rm-cookie p { margin: 0; }

/* Title and text share one paragraph flow: "⌖ COOKIES  Only what the site needs… Cookie policy". */
.rm-cookie__body { margin: 0; color: var(--rm-text, #111827); }
.rm-cookie__title {
  display: inline; margin: 0 .4em 0 0; padding: 0; border: 0;
  font: 700 .98rem/1 var(--rm-font-head, "Barlow Condensed", "Arial Narrow", sans-serif); letter-spacing: .08em; text-transform: uppercase;
  color: var(--rm-blue, #05357e);
}
.rm-cookie__title::before, .rm-cookie__title::after { content: none; }
.rm-cookie__mark { display: inline-block; width: 13px; height: 13px; margin: 0 5px 0 0; vertical-align: -1px; color: var(--rm-orange-text, #b04a00); }
.rm-cookie__text { display: inline; color: var(--rm-text, #111827); }
/* The policy link keeps its text-sized box (so its focus ring hugs the words) and gets a 44px-tall hit area from ::after. The
   actions row below starts 12px under the text and is painted above that area, so the two never fight over a tap. */
.rm-cookie__policy, .rm-cookie__text a {
  position: relative; white-space: nowrap;
  color: var(--rm-blue, #05357e); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.rm-cookie__policy::after, .rm-cookie__text a::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; margin-top: -22px; }
.rm-cookie__text a:hover { color: var(--rm-blue, #05357e); text-decoration-thickness: 2px; }
.rm-cookie__text a:focus-visible { outline: 2px solid var(--rm-blue, #05357e); outline-offset: 2px; border-radius: 2px; }
.rm-cookie__current { margin-top: 6px !important; font: 500 .75rem/1.4 var(--rm-font-mono, "IBM Plex Mono", ui-monospace, monospace); letter-spacing: .04em; color: var(--rm-muted, #4b5563); }

.rm-cookie__actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rm-cookie__btn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 40px; margin: 0; padding: 8px 16px;
  border: 1.5px solid transparent; border-radius: 6px; cursor: pointer;
  font: 700 .9375rem/1.1 var(--rm-font-head, "Barlow Condensed", "Arial Narrow", sans-serif); letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; text-decoration: none; box-shadow: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.rm-cookie__btn--primary { background: var(--rm-orange, #fa7818); border-color: var(--rm-orange, #fa7818); color: var(--rm-on-orange, #170900); }
.rm-cookie__btn--primary:hover { background: var(--rm-orange-hover, #ff8a33); border-color: var(--rm-orange-hover, #ff8a33); color: var(--rm-on-orange, #170900); }
.rm-cookie__btn--ghost { background: var(--rm-white, #ffffff); border-color: var(--rm-blue, #05357e); color: var(--rm-blue, #05357e); }
.rm-cookie__btn--ghost:hover { background: rgba(5, 53, 126, .06); box-shadow: inset 0 0 0 1px var(--rm-blue, #05357e); color: var(--rm-blue, #05357e); }
.rm-cookie__btn:focus-visible { outline: 2px solid var(--rm-blue, #05357e); outline-offset: 2px; border-radius: 6px; }
.rm-cookie__error { margin-top: 10px !important; padding: 8px 10px; border-left: 3px solid #b42318; border-radius: 4px; background: #fef3f2; color: #b42318; font-size: .875rem; font-weight: 600; }
.rm-cookie-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Keyboard focus never ends up hidden behind the notice, and on phones the page can scroll its last lines clear of it. */
html.rm-cookie-open { scroll-padding-bottom: var(--rm-cookie-offset, 0px); }

@media (min-width: 641px) {
  /* While the chat panel is open the card goes back to the left edge, clear of the panel (it may have moved right to keep off
     the hero's buttons). */
  html:has(.rmc[data-state="open"]) .rm-cookie { left: 24px; }
}

@media (max-width: 640px) {
  .rm-cookie {
    left: 0; right: 0; bottom: 0; width: auto; max-height: 60vh;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-width: 3px 0 0; border-radius: 12px 12px 0 0;
    box-shadow: 0 -12px 32px -18px rgba(5, 30, 70, .38);
  }
  .rm-cookie__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rm-cookie__btn { min-height: 44px; padding: 8px 10px; }
  html.rm-cookie-open body { padding-bottom: var(--rm-cookie-offset, 0px); }
}
@media (max-width: 360px) {
  .rm-cookie { padding-left: 14px; padding-right: 14px; }
  .rm-cookie__btn { padding: 8px 6px; font-size: .9rem; letter-spacing: .04em; }
}
@media (max-width: 280px) {
  .rm-cookie__actions { grid-template-columns: minmax(0, 1fr); }
}

/* The "Cookie settings" link the plugin adds when the page has none (inside the theme's footer row when there is one). */
.rm-cookie-fallback { margin: 0; padding: 14px 16px 22px; text-align: center; font-size: .8125rem; background: var(--rm-paper, #f4f6f9); }
.rm-cookie-fallback[hidden] { display: none; }
.rm-cookie-settings { color: inherit; }
button.rm-cookie-settings { margin: 0; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: inherit; }
.rm-cookie-fallback .rm-cookie-settings { color: var(--rm-blue, #05357e); text-decoration: underline; text-underline-offset: 3px; }

@keyframes rm-cookie-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rm-cookie { animation: none; } .rm-cookie__btn { transition: none; } }
@media (forced-colors: active) { .rm-cookie { border: 2px solid CanvasText; } .rm-cookie__btn { border-color: ButtonText; } }
@media print { .rm-cookie, .rm-cookie-fallback { display: none !important; } }
