/*
 * ResultsAiX Engage front-end styles.
 *
 * This runs on a real visitor's page, so it is written to be a good guest:
 *  - Everything is namespaced under .rae-c so it cannot leak into the theme,
 *    and the theme cannot easily leak in (explicit box-sizing, line-height,
 *    font on the panel).
 *  - Colours come from the four custom properties the renderer sets inline
 *    (--rae-bg, --rae-fg, --rae-btn, --rae-btn-fg), so one stylesheet themes
 *    every campaign in every colour the site owner picks.
 *  - Fixed-position layers use a high but not absurd z-index and never trap
 *    the page: a bar does not cover content, a popup can always be closed.
 *  - prefers-reduced-motion removes every transition and animation.
 */

.rae-c, .rae-c * { box-sizing: border-box; }

.rae-c {
    position: fixed;
    z-index: 2147483000; /* above almost everything, below nothing that matters */
    /*
     * No webfont. Outfit used to lead this stack, but the plugin never loads
     * it on the front end, so it only ever applied on sites that happened to
     * have it already. Requesting it here would put a third party font call on
     * every page view of every customer site, which is not ours to spend. The
     * "Match my theme" typeface setting is the way to look native.
     */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.rae-c-panel {
    position: relative;
    background: var(--rae-bg, #0a0a0a);
    color: var(--rae-fg, #fafaf9);
    border-radius: var(--rae-radius, 0);
}
.rae-c-panel.rae-shadow { box-shadow: 0 10px 40px rgba(0, 0, 0, .28); }

/* ---------------------------------------------------------------- content */

.rae-c-body { display: flex; align-items: center; gap: 16px; padding: 14px 22px; flex-wrap: wrap; }
.rae-c-text { flex: 1 1 auto; min-width: 0; }
.rae-c-head { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.rae-c-sub { font-size: 14px; opacity: .85; margin-top: 2px; }
.rae-c-icon { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.rae-c-img { max-height: 46px; width: auto; border-radius: 6px; flex: 0 0 auto; }

.rae-c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--rae-btn, #f59e0b);
    color: var(--rae-btn-fg, #0a0a0a);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .12s ease, filter .12s ease;
}
.rae-c-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.rae-c-btn:active { transform: translateY(0); }
.rae-c-btn:focus-visible { outline: 3px solid var(--rae-btn, #f59e0b); outline-offset: 2px; }
.rae-c-btn[disabled] { opacity: .6; cursor: default; }
.rae-c-ghost {
    background: transparent;
    color: var(--rae-fg, #fafaf9);
    border: 1px solid currentColor;
    opacity: .85;
}
.rae-c-ghost:hover { filter: none; opacity: 1; }

/* close button */
.rae-c-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rae-fg, #fafaf9);
    font-size: 22px;
    line-height: 1;
    opacity: .6;
    cursor: pointer;
    transition: opacity .12s ease;
}
.rae-c-close:hover { opacity: 1; }
.rae-c-close:focus-visible { outline: 2px solid var(--rae-btn, #f59e0b); opacity: 1; }

/* ------------------------------------------------------------------- form */

.rae-c-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rae-c-optin { flex: 1 1 auto; min-width: 220px; }
.rae-c-input {
    flex: 1 1 180px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    color: #111;
    font-family: inherit;
    font-size: 14px;
}
.rae-c-input:focus { outline: 2px solid var(--rae-btn, #f59e0b); outline-offset: 1px; }
/* Honeypot: pushed off-screen, never display:none so bots still fill it. */
.rae-c-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
}
.rae-c-consent { flex: 1 1 100%; font-size: 12px; opacity: .8; margin: 6px 0 0; }
.rae-c-consent a { color: inherit; text-decoration: underline; }
.rae-c-msg { flex: 1 1 100%; font-size: 13px; margin: 6px 0 0; }
.rae-c-msg-err { color: #ffd7d7; }
.rae-c-success { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.rae-c-tick {
    display: grid; place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--rae-btn, #f59e0b);
    color: var(--rae-btn-fg, #0a0a0a);
    font-weight: 800;
    flex: 0 0 auto;
}
.rae-c-success p { margin: 0; font-weight: 600; }

/* -------------------------------------------------------------------- bars */

.rae-c-bar { left: 0; right: 0; }
.rae-c-bar.rae-pos-top { top: 0; }
.rae-c-bar.rae-pos-bottom { bottom: 0; }
.rae-c-bar .rae-c-panel { border-radius: 0; }

/*
 * A bar always spans its edge.
 *
 * The renderer stamps rae-w-<width> on every panel, and the width control is
 * only offered for popups, so without this a bar inherits the medium default
 * and stops dead at 520px: a "sticky header bar" that covers a third of the
 * screen and leaves the rest of the page showing through beside it.
 *
 * Three classes deliberately: .rae-c-panel.rae-w-medium further down this file
 * carries the same weight as a two class selector, and being later it would
 * win. The extra .rae-c is what makes this override actually apply.
 */
.rae-c.rae-c-bar .rae-c-panel { max-width: none; }

/*
 * The WordPress admin bar.
 *
 * Only a logged-in user sees it, but that is the site owner every single time
 * they test, so a top bar parked underneath it reads as broken to the one
 * person deciding whether this plugin works. Offsets follow WordPress's own
 * breakpoints. Below 600px core switches the admin bar to position:absolute so
 * it scrolls away, and a fixed offset would leave a gap: there we sit at the
 * top as normal. The lowered z-index keeps admin bar dropdown menus clickable
 * over our bar instead of behind it.
 */
body.admin-bar .rae-c-bar.rae-pos-top { top: 32px; z-index: 99998; }
@media screen and (max-width: 782px) {
    body.admin-bar .rae-c-bar.rae-pos-top { top: 46px; }
}
@media screen and (max-width: 600px) {
    body.admin-bar .rae-c-bar.rae-pos-top { top: 0; z-index: 2147483000; }
}
.rae-c-t-floating-bar { padding: 12px; }
.rae-c-t-floating-bar .rae-c-panel { border-radius: var(--rae-radius, 12px); }

/* split bar */
.rae-c-split { padding: 0; }
.rae-c-split { display: grid; grid-template-columns: repeat(var(--rae-cols, 3), 1fr); gap: 0; }
.rae-c-col {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    text-align: center;
    flex-wrap: wrap;
}
.rae-c-col + .rae-c-col { border-left: 1px solid rgba(255, 255, 255, .15); }

/* ticker */
/* Keep the scrolling run clear of the close button in the top right corner. */
.rae-c-ticker { padding: 0; overflow: hidden; margin-right: 38px; }
.rae-c-ticker-track { display: inline-flex; white-space: nowrap; animation: rae-ticker 22s linear infinite; }
.rae-c-ticker-item { padding: 13px 40px; font-weight: 600; }
@keyframes rae-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.rae-c-bar:hover .rae-c-ticker-track { animation-play-state: paused; }

/* countdown */
.rae-c-countdown { justify-content: center; }
.rae-c-clock { display: inline-flex; gap: 10px; }
.rae-c-unit { display: inline-flex; flex-direction: column; align-items: center; min-width: 42px; }
.rae-c-unit b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.rae-c-unit i { font-size: 10px; font-style: normal; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin-top: 3px; }

/* coupon */
.rae-c-coupon-body { justify-content: center; }
.rae-c-coupon { display: inline-flex; align-items: center; gap: 8px; }
.rae-c-code {
    padding: 8px 14px;
    border: 2px dashed var(--rae-btn, #f59e0b);
    border-radius: 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .06em;
}
.rae-c-copy {
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--rae-btn, #f59e0b);
    color: var(--rae-btn-fg, #0a0a0a);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* cookie bar */
.rae-c-cookie { justify-content: space-between; }
.rae-c-cookie-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* -------------------------------------------------------------- side tab */

/*
 * A tab is a vertical LABEL that opens a normal horizontal card.
 *
 * writing-mode used to sit on the whole panel, which rotated everything
 * inside it: the headline, the CTA and the entire opt-in form ran sideways
 * down a thin strip and nothing ever expanded. Only the label is rotated now.
 */
.rae-c-tab { top: 40%; }
.rae-c-tab.rae-tab-right { right: 0; }
.rae-c-tab.rae-tab-left { left: 0; }
.rae-c-tab .rae-c-panel { padding: 0; overflow: hidden; }
.rae-c-tab.rae-tab-right .rae-c-panel { border-radius: 10px 0 0 10px; }
.rae-c-tab.rae-tab-left .rae-c-panel { border-radius: 0 10px 10px 0; }

.rae-c-tab .rae-c-body { padding: 0; gap: 0; align-items: stretch; flex-wrap: nowrap; }
/*
 * The label stays pinned to the screen edge and the card opens inwards. The
 * panel is anchored by right:0 / left:0, so on the right hand side the label
 * has to come LAST in visual order, or opening the card shoves the handle
 * sideways across the page under the visitor's cursor.
 */
.rae-c-tab.rae-tab-right .rae-c-body { flex-direction: row-reverse; }

.rae-c-tab-label {
    writing-mode: vertical-rl;
    flex: 0 0 auto;
    padding: 18px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    cursor: pointer;
}
.rae-c-tab.rae-tab-left .rae-c-tab-label { writing-mode: vertical-lr; }
.rae-c-tab-label:focus-visible { outline: 2px solid var(--rae-btn, #f59e0b); outline-offset: -3px; }

.rae-c-tab-card { flex: 0 0 auto; width: 290px; padding: 18px 20px; }
/* Explicit, because a display on the element would beat the hidden attribute. */
.rae-c-tab-card[hidden] { display: none; }
.rae-c-tab-card .rae-c-head { font-size: 17px; }
.rae-c-tab-card .rae-c-sub { margin-top: 4px; }
.rae-c-tab-card .rae-c-optin { margin-top: 12px; min-width: 0; }
.rae-c-tab-card .rae-c-input { flex: 1 1 100%; }
.rae-c-tab-card .rae-c-btn { margin-top: 12px; }

/* ----------------------------------------------------------------- popups */

.rae-c-popup {
    inset: 0;
    display: flex;
    padding: 20px;
    background: rgba(10, 10, 10, .55);
}
.rae-c-popup.rae-no-overlay { background: transparent; pointer-events: none; }
.rae-c-popup.rae-no-overlay .rae-c-panel { pointer-events: auto; }
.rae-c-popup.rae-blur { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.rae-c-popup .rae-c-panel { margin: auto; width: 100%; }
.rae-c-popup .rae-c-body { flex-direction: column; align-items: stretch; text-align: center; padding: 34px; gap: 14px; }
.rae-c-popup .rae-c-head { font-size: 24px; }
.rae-c-popup .rae-c-sub { font-size: 16px; }
.rae-c-popup .rae-c-form { justify-content: center; }
.rae-c-popup .rae-c-btn { align-self: center; }

/* widths */
.rae-w-narrow .rae-c-panel, .rae-c-popup.rae-w-narrow { max-width: 380px; }
.rae-c-popup .rae-w-narrow { max-width: 380px; }
.rae-c-popup.rae-w-narrow .rae-c-panel { max-width: 380px; }
.rae-c-popup.rae-w-medium .rae-c-panel { max-width: 520px; }
.rae-c-popup.rae-w-wide .rae-c-panel { max-width: 720px; }
.rae-c-popup.rae-w-full .rae-c-panel { max-width: 100%; }
.rae-c-panel.rae-w-narrow { max-width: 380px; }
.rae-c-panel.rae-w-medium { max-width: 520px; }
.rae-c-panel.rae-w-wide { max-width: 720px; }

/* slide-in: a corner card, not a full overlay */
.rae-c-popup.rae-corner-bottom-right,
.rae-c-popup.rae-corner-bottom-left,
.rae-c-popup.rae-corner-top-right,
.rae-c-popup.rae-corner-top-left { background: transparent; pointer-events: none; padding: 20px; }
.rae-c-popup[class*="rae-corner-"] .rae-c-panel { pointer-events: auto; margin: 0; max-width: 360px; }
.rae-corner-bottom-right { align-items: flex-end; justify-content: flex-end; }
.rae-corner-bottom-left { align-items: flex-end; justify-content: flex-start; }
.rae-corner-top-right { align-items: flex-start; justify-content: flex-end; }
.rae-corner-top-left { align-items: flex-start; justify-content: flex-start; }
.rae-c-t-slide-in .rae-c-body { text-align: left; padding: 24px; }

/* welcome mat + entry gate: full screen */
.rae-c-t-welcome-mat .rae-c-panel,
.rae-c-t-entry-gate .rae-c-panel { max-width: 100%; min-height: 100vh; border-radius: 0; display: flex; align-items: center; justify-content: center; }
.rae-c-t-welcome-mat .rae-c-body,
.rae-c-t-entry-gate .rae-c-body { max-width: 640px; }

/* sheet: a full-width panel at top or bottom */
.rae-c-popup.rae-sheet-bottom { align-items: flex-end; padding: 0; }
.rae-c-popup.rae-sheet-top { align-items: flex-start; padding: 0; }
.rae-sheet-bottom .rae-c-panel, .rae-sheet-top .rae-c-panel { max-width: 100%; border-radius: 0; }

/* drawer: full height at left or right */
.rae-c-popup.rae-drawer-right { justify-content: flex-end; padding: 0; }
.rae-c-popup.rae-drawer-left { justify-content: flex-start; padding: 0; }
.rae-drawer-right .rae-c-panel, .rae-drawer-left .rae-c-panel { max-width: 400px; min-height: 100vh; border-radius: 0; margin: 0; }

/* video */
.rae-c-video { position: relative; width: 100%; padding-top: 56.25%; border-radius: 8px; overflow: hidden; }
.rae-c-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* two-step */
.rae-c-yesno { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rae-c-step2 { margin-top: 4px; }

/* content locker */
.rae-c-lock .rae-c-lock-ico { font-size: 34px; }

/* ------------------------------------------------------------------- chat */

.rae-c-chat { bottom: 20px; right: 20px; }
.rae-c-chat .rae-c-panel { background: transparent; box-shadow: none; }
.rae-c-chat-bubble {
    width: 60px; height: 60px;
    border: 0;
    border-radius: 50%;
    background: var(--rae-btn, #f59e0b);
    color: var(--rae-btn-fg, #0a0a0a);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    cursor: pointer;
    position: relative;
    display: grid;
    place-items: center;
}
.rae-c-chat-bubble img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.rae-c-chat-ico { font-size: 26px; }
.rae-c-chat-badge {
    position: absolute; top: -2px; right: -2px;
    min-width: 20px; height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #d63638;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.rae-c-chat-card {
    width: 320px;
    max-width: calc(100vw - 40px);
    background: var(--rae-bg, #0a0a0a);
    color: var(--rae-fg, #fafaf9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .3);
}
.rae-c-chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.rae-c-chat-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.rae-c-chat-name { font-weight: 700; flex: 1 1 auto; }
.rae-c-chat-x { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; opacity: .6; }
.rae-c-chat-x:hover { opacity: 1; }
.rae-c-chat-thread { padding: 16px; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.rae-c-chat-msg {
    background: rgba(255, 255, 255, .1);
    padding: 10px 14px;
    border-radius: 14px 14px 14px 4px;
    font-size: 14px;
    max-width: 85%;
    align-self: flex-start;
}
.rae-c-chat-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
.rae-c-chat-foot .rae-c-optin, .rae-c-chat-foot .rae-c-form { flex-direction: column; align-items: stretch; }
.rae-c-chat-foot .rae-c-btn { width: 100%; }
.rae-c-typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: rgba(255, 255, 255, .1); border-radius: 14px; align-self: flex-start; }
.rae-c-typing span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; animation: rae-typing 1s infinite; }
.rae-c-typing span:nth-child(2) { animation-delay: .15s; }
.rae-c-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes rae-typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* --------------------------------------------------------------- animation */

/* Entry and exit. engage.js adds rae-in on show and rae-out on close. */
.rae-c-panel, .rae-c .rae-c-panel { will-change: transform, opacity; }

.rae-c:not(.rae-c-chat) .rae-c-panel { opacity: 0; transition: opacity .28s ease, transform .28s ease; }
.rae-c.rae-in .rae-c-panel { opacity: 1; }

/*
 * slide
 *
 * These rules used to ignore the chosen animation entirely: the rae-anim-*
 * class is on the panel while rae-c-bar is on the wrapper, and the bar rules
 * only referenced the wrapper. Every bar slid in, so picking Fade or None for
 * a bar did nothing at all. Now only the moving animations translate.
 */
.rae-c-bar.rae-pos-top .rae-anim-slide,
.rae-c-bar.rae-pos-top .rae-anim-bounce { transform: translateY(-100%); }
.rae-c-bar.rae-pos-bottom .rae-anim-slide,
.rae-c-bar.rae-pos-bottom .rae-anim-bounce { transform: translateY(100%); }
.rae-c-bar.rae-in .rae-c-panel { transform: translateY(0); }
.rae-c-bar .rae-anim-fade { transform: none; }

/* "None" means no motion, not a slower slide. */
.rae-c .rae-anim-none { transition: none !important; transform: none !important; }

.rae-c-popup .rae-anim-slide { transform: translateY(20px); }
.rae-c-popup.rae-in .rae-anim-slide { transform: translateY(0); }
.rae-c-popup .rae-anim-zoom { transform: scale(.94); }
.rae-c-popup.rae-in .rae-anim-zoom { transform: scale(1); }
.rae-c-popup .rae-anim-fade { transform: none; }
.rae-c-popup .rae-anim-bounce { transform: scale(.9); }
.rae-c-popup.rae-in .rae-anim-bounce { transform: scale(1); transition: transform .4s cubic-bezier(.2, 1.4, .5, 1); }

.rae-drawer-right .rae-c-panel { transform: translateX(100%); }
.rae-drawer-left .rae-c-panel { transform: translateX(-100%); }
.rae-drawer-right.rae-in .rae-c-panel, .rae-drawer-left.rae-in .rae-c-panel { transform: translateX(0); }
.rae-sheet-bottom .rae-c-panel { transform: translateY(100%); }
.rae-sheet-top .rae-c-panel { transform: translateY(-100%); }
.rae-sheet-bottom.rae-in .rae-c-panel, .rae-sheet-top.rae-in .rae-c-panel { transform: translateY(0); }

.rae-c.rae-out .rae-c-panel { opacity: 0; }

/* chat animates its own bubble/card, not the panel */
.rae-c-chat .rae-c-panel { opacity: 1; }
.rae-c-chat-card { animation: rae-pop .25s ease; }
@keyframes rae-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- spin to win */

.rae-c-spin { text-align: center; }
.rae-c-wheel-stage { display: flex; justify-content: center; margin: 6px 0 14px; }

.rae-c-wheel { position: relative; width: 260px; max-width: 78vw; }
.rae-c-wheel-svg {
    display: block;
    width: 100%;
    height: auto;
    /* Starts unrotated; the transition is set in JS at the moment of the spin
       so a reduced-motion visitor is not spun before the result is known. */
    transform: rotate(0deg);
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35));
}
.rae-c-wheel-label {
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    fill: #fafaf9;
}
.rae-c-wheel-hub { fill: var(--rae-btn, #f59e0b); }

/* The pin the wheel stops under, at twelve o'clock. */
.rae-c-wheel-pin {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 20px solid var(--rae-btn, #f59e0b);
}

.rae-c-wheel-result { margin-top: 12px; }
.rae-c-wheel-won { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.rae-c-spin .rae-c-coupon { justify-content: center; }
.rae-c-spin .rae-c-optin[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    /* Land on the answer instead of spinning to it. */
    .rae-c-wheel-svg { transition: none !important; }
}

/* ------------------------------------------------------- content locking */

/*
 * What the content locker does to the article behind it. Applied by engage.js
 * to the chosen element, removed again the moment the visitor converts.
 */
.rae-locked {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* ------------------------------------------------------------- settings */

/*
 * design.sticky: a bar that does not stay put scrolls away with the page.
 * The whole layer is position:fixed, so switching this one off has to move it
 * to absolute and, for a top bar, out of the viewport corner.
 */
.rae-c-bar.rae-not-sticky { position: absolute; }
.rae-c-bar.rae-not-sticky.rae-pos-bottom { top: auto; bottom: auto; }

/*
 * design.font: "inherit" lets the campaign take the theme's own typeface so it
 * looks native on the site. The default stays the plugin stack.
 */
.rae-c.rae-font-inherit,
.rae-c.rae-font-inherit .rae-c-panel,
.rae-c.rae-font-inherit .rae-c-btn,
.rae-c.rae-font-inherit .rae-c-input { font-family: inherit; }

/* --------------------------------------------------------------- responsive */

@media (max-width: 600px) {
    .rae-c-body { padding: 12px 16px; gap: 10px; }
    .rae-c-popup { padding: 12px; }
    .rae-c-popup .rae-c-body { padding: 24px 18px; }
    .rae-c-popup .rae-c-head { font-size: 20px; }
    .rae-c-split { grid-template-columns: 1fr; }
    .rae-c-col + .rae-c-col { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .15); }
    .rae-c-chat { right: 12px; bottom: 12px; }
    .rae-drawer-right .rae-c-panel, .rae-drawer-left .rae-c-panel { max-width: 88vw; }

    /*
     * mobile.font_scale, set as --rae-mscale by the renderer. Applied only on
     * a phone, which is the whole point of the setting: headlines sized for a
     * desktop bar are often two lines too many on a 375px screen.
     */
    .rae-c-head { font-size: calc(16px * var(--rae-mscale, 1)); }
    .rae-c-sub { font-size: calc(14px * var(--rae-mscale, 1)); }
    .rae-c-popup .rae-c-head { font-size: calc(20px * var(--rae-mscale, 1)); }
    .rae-c-popup .rae-c-sub { font-size: calc(15px * var(--rae-mscale, 1)); }
    .rae-c-btn { font-size: calc(14px * var(--rae-mscale, 1)); }

    /* mobile.position: flip a bar to the other edge on a phone. */
    .rae-c-bar.rae-m-top { top: 0; bottom: auto; }
    .rae-c-bar.rae-m-bottom { top: auto; bottom: 0; }
    body.admin-bar .rae-c-bar.rae-m-bottom { top: auto; }
}

/* --------------------------------------------------- reduced motion + a11y */

@media (prefers-reduced-motion: reduce) {
    .rae-c *, .rae-c-panel {
        animation: none !important;
        transition: none !important;
    }
    .rae-c .rae-c-panel { opacity: 1 !important; transform: none !important; }
}
.rae-c.rae-no-motion .rae-c-panel { transition: none !important; }
.rae-c [hidden] { display: none !important; }
