.rhf {
  --rhf-h: 0px;
  box-sizing: border-box;
  font-family: inherit;
  color: var(--rhf-text);
  background: var(--rhf-bg);
  z-index: 99998;
}
.rhf *, .rhf *::before, .rhf *::after { box-sizing: border-box; }
.rhf[hidden] { display: none !important; }

.rhf__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 56px 12px 20px;
  position: relative;
}
.rhf__badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--rhf-accent);
  color: var(--rhf-accent-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rhf__copy { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.rhf__headline { display: block; font-size: 16px; font-weight: 700; color: var(--rhf-text); }
.rhf__message { display: block; font-size: 14px; opacity: .85; margin-top: 2px; }

.rhf .rhf__button {
  flex: none;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--rhf-accent);
  color: var(--rhf-accent-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rhf .rhf__button:hover,
.rhf .rhf__button:focus-visible {
  color: var(--rhf-accent-text);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.rhf .rhf__button:focus-visible,
.rhf .rhf__close:focus-visible { outline: 2px solid var(--rhf-text); outline-offset: 2px; }

.rhf .rhf__close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rhf-text);
  font-size: 24px;
  line-height: 32px;
  cursor: pointer;
  opacity: .75;
}
.rhf .rhf__close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }

/* Full-width bar */
.rhf--bar {
  position: fixed;
  left: 0;
  right: 0;
  box-shadow: 0 0 24px rgba(0, 0, 0, .25);
  transition: transform .35s ease;
}
.rhf--bar.rhf--bottom { bottom: 0; transform: translateY(100%); border-top: 3px solid var(--rhf-accent); }
.rhf--bar.rhf--top { top: 0; transform: translateY(-100%); border-bottom: 3px solid var(--rhf-accent); }
body.admin-bar .rhf--bar.rhf--top { top: 32px; }
.rhf--bar.rhf--in { transform: translateY(0); }

/* Keep page content and the reCAPTCHA badge clear of the bar */
html.rhf-on-bottom { padding-bottom: var(--rhf-h); }
html.rhf-on-top { padding-top: var(--rhf-h); }
html.rhf-on-bottom .grecaptcha-badge { bottom: calc(var(--rhf-h) + 14px) !important; transition: bottom .35s ease !important; }

/* Corner card */
.rhf--card {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  border-radius: 10px;
  border-top: 4px solid var(--rhf-accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .35s ease, transform .35s ease;
}
.rhf--card.rhf--in { opacity: 1; transform: translateY(0); }
.rhf--card .rhf__inner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; }
.rhf--card .rhf__close { top: 10px; right: 10px; transform: none; }
.rhf--card .rhf__headline { font-size: 18px; padding-right: 24px; }
.rhf--card .rhf__button { align-self: stretch; text-align: center; }

/* Inline (shortcode) */
.rhf--inline { border-radius: 8px; border-left: 5px solid var(--rhf-accent); margin: 24px 0; }
.rhf--inline .rhf__inner { padding: 18px 20px; }

@media (max-width: 782px) {
  body.admin-bar .rhf--bar.rhf--top { top: 46px; }
}
@media (max-width: 640px) {
  .rhf--no-mobile { display: none !important; }
  .rhf--bar .rhf__inner,
  .rhf--inline .rhf__inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 48px 10px 14px; }
  .rhf--bar .rhf__badge { display: none; }
  .rhf--bar .rhf__message { display: none; }
  .rhf--bar .rhf__headline { font-size: 15px; }
  .rhf--bar .rhf__button { padding: 8px 14px; font-size: 14px; }
  .rhf--card { left: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .rhf, .rhf .rhf__button { transition: none !important; }
}
