/* Rustfish consent UI — matches site chrome: Montserrat buttons/headings,
   Raleway body, racing green #65ae16 accent, footer-gold #c0a375 links. */

.rf-consent,
.rf-consent-control {
  --rf-surface: #0e0e0e;
  --rf-line: #2b2b2b;
  --rf-btn-bg: #262626;
  --rf-btn-bg-hover: #333333;
  --rf-btn-line: #6a6a6a;
  --rf-btn-line-hover: #8c8c8c;
  --rf-heading: #ffffff;
  --rf-body: #b5b5b5;
  --rf-btn-text: #f2f2f2;
  --rf-link: #c0a375;
  --rf-accent: #65ae16;
  box-sizing: border-box;
}

.rf-consent *,
.rf-consent-control * {
  box-sizing: border-box;
}

.rf-consent[hidden],
.rf-consent-control[hidden] {
  display: none !important;
}

/* The Mobirise scroll-animation in assets/theme/js/script.js tags every
   p/h2/a/button on the page with `.hidden` (visibility: hidden) and only
   reveals them once they scroll into view. A fixed consent control never
   participates in that, so it would stay invisible or unfocusable. This is a
   legal control, not decoration — it opts the whole subtree out. */
.rf-consent,
.rf-consent *,
.rf-consent-control {
  visibility: visible !important;
}

.rf-consent *,
.rf-consent-control {
  animation: none !important;
}

/* ---------- Banner ---------- */

.rf-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6000;
  background: var(--rf-surface);
  border-top: 1px solid var(--rf-line);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
  padding: 22px 24px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: rf-consent-in 240ms cubic-bezier(0, 0, 0.2, 1) both;
}

@keyframes rf-consent-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rf-consent-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.rf-consent-copy {
  flex: 1 1 auto;
  min-width: 0;
}

/* Host pages style bare h2/p elements; reset anything that would leak in. */
.rf-consent-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rf-heading);
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

/* Focus is moved to the dialog container on open so screen readers announce it.
   The container is not an interactive control, so it takes no visible ring. */
.rf-consent:focus {
  outline: none;
}

.rf-consent-text {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--rf-body);
  margin: 0;
  max-width: 72ch;
}

.rf-consent-text a {
  color: var(--rf-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rf-consent-text a:hover {
  color: #d6bd97;
}

.rf-consent-gpc {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #d6d6d6;
  background: rgba(101, 174, 22, 0.1);
  border-left: 3px solid var(--rf-accent);
  padding: 10px 14px;
  margin: 12px 0 0;
  max-width: 72ch;
}

/* Accept and Decline are deliberately identical: same size, colour, weight,
   border and hover treatment. Refusing must be exactly as easy as accepting. */
.rf-consent-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
}

.rf-consent-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--rf-btn-text);
  background: var(--rf-btn-bg);
  border: 1px solid var(--rf-btn-line);
  border-radius: 3px;
  padding: 0.9375rem 2.1875rem;
  min-width: 148px;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  -webkit-appearance: none;
  appearance: none;
}

.rf-consent-btn:hover {
  background: var(--rf-btn-bg-hover);
  border-color: var(--rf-btn-line-hover);
  color: #ffffff;
}

/* assets/css/main.css sets `button { outline: none !important }` and
   `a:focus { outline: none !important }` site-wide, so the focus ring has to
   be declared !important to survive. */
.rf-consent-btn:focus-visible,
.rf-consent-text a:focus-visible,
.rf-consent-control:focus-visible {
  outline: 3px solid var(--rf-accent) !important;
  outline-offset: 2px;
}

/* ---------- Floating re-open control ---------- */

.rf-consent-control {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 5999;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c7c7c7;
  background: rgba(14, 14, 14, 0.94);
  border: 1px solid var(--rf-btn-line);
  border-radius: 3px;
  padding: 0 18px;
  min-height: 44px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  -webkit-appearance: none;
  appearance: none;
}

.rf-consent-control:hover {
  color: #ffffff;
  background: rgba(38, 38, 38, 0.97);
  border-color: var(--rf-btn-line-hover);
}

/* ---------- Mobile: full-width card, stacked equal-width buttons ---------- */

@media (max-width: 767px) {
  .rf-consent {
    padding: 20px 16px;
  }

  .rf-consent-inner {
    display: block;
  }

  .rf-consent-actions {
    display: block;
    margin-top: 18px;
  }

  .rf-consent-btn {
    display: block;
    width: 100%;
    min-width: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .rf-consent-btn + .rf-consent-btn {
    margin-top: 12px;
  }

  .rf-consent-control {
    left: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rf-consent {
    animation: none;
  }

  .rf-consent-btn,
  .rf-consent-control {
    transition: none;
  }
}
