/* RED MOTORS R19 integration layer (2026-11-15). Loaded after r31.css. It adds NO interface styling of its own: it only places the existing R18 Home document beneath the
   R32 shell on the #/home route, reproduces R18's "no interface during the opening" rule for that shell, and turns the R32 Planet / Home controls into live controls. */

/* ---- the R18 Home document (home/index.html) fills the viewport beneath the R32 navigation ---- */
#r19-home { position: fixed; left: 0; top: 0; width: 100%; height: 100%; border: 0; margin: 0; padding: 0; z-index: 0; background: #050506; display: block; color-scheme: dark; }
html[data-r19-route="home"], html[data-r19-route="home"] body { overflow: hidden !important; overscroll-behavior: none; }
/* the sidebar column itself lets the pointer through to Home (as the R18 rail did); its controls stay live */
html[data-r19-route="home"] body :is(#root, .r12-chrome) .rds { pointer-events: none !important; }
html[data-r19-route="home"] body :is(#root, .r12-chrome) .rds :is(a, button) { pointer-events: auto !important; }

/* ---- R18 opening: no interface at all until the presentation scene takes over, then one 1 s fade (site.css of R18: html[data-reveal="1"] … transition: opacity 1s ease) ---- */
html[data-r19-route="home"][data-r19-home="intro"] body :is(#root, .r12-chrome) :is(.rds, .app-topbar, .bottom-nav, .r5-planet-entry) { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transition: none !important; }
html[data-r19-route="home"][data-r19-home="intro"] body :is(#root, .r12-chrome) .rds :is(a, button) { pointer-events: none !important; }
html[data-r19-route="home"][data-r19-home="reveal"] body :is(#root, .r12-chrome) :is(.rds, .app-topbar, .bottom-nav, .r5-planet-entry) { transition: opacity 1s ease !important; }

/* ---- Fire Planet animation (desktop): while the R18 sphere travels to / from the Planet section the R32 control cross-fades with it (--r19-orb is set by home/planet/planet.js through rm-integration.js) ---- */
html[data-r19-route="home"]:not([data-r19-home="intro"]) body :is(#root, .r12-chrome) .r5-planet-entry { opacity: var(--r19-orb, 1) !important; }
html[data-r19-route="home"][data-r19-orb="away"] body :is(#root, .r12-chrome) .r5-planet-entry { pointer-events: none !important; }
@media (min-width: 761px) and (max-width: 899px) {
  html[data-r19-route="home"]:not([data-r19-home="intro"]) body :is(#root, .r12-chrome) .rm24-centre > .r6-sphere { opacity: var(--r19-orb, 1) !important; }
}

/* ---- the Planet and Home controls are live now (R32 showed them as "coming soon": default cursor) ---- */
html body :is(#root, .r12-chrome) :is(.r5-planet-entry, .rm24-centre)[data-enter-planet], html body :is(#root, .r12-chrome) button.rds__link:is([data-enter-planet], .r16-home) { cursor: pointer !important; }

/* ---- Planet fallback panel (only if the browser blocks the new tab; R18 markup, R18 glass button) ---- */
#rm-enter-ecover .lg-btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0 22px; height: 34px; border: 0; border-radius: 999px; cursor: pointer; color: #ece9e6; font: 500 11.5px/1 Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; text-decoration: none; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(120% 140% at 10% 0%, rgba(255,255,255,.16), transparent 62%), radial-gradient(90% 130% at 100% 100%, rgba(150,26,22,.20), transparent 66%), linear-gradient(180deg, rgba(24,24,30,.46) 0%, rgba(9,9,12,.54) 50%, rgba(4,4,6,.62) 100%);
  -webkit-backdrop-filter: blur(46px) saturate(2.2) brightness(.85); backdrop-filter: blur(46px) saturate(2.2) brightness(.85);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.20), inset 0 1.5px 0 rgba(255,255,255,.26), inset 0 -1px 0 rgba(255,255,255,.06), 0 8px 26px rgba(0,0,0,.5); transition: color .25s, box-shadow .25s, transform .25s; }
#rm-enter-ecover .lg-btn > span { position: relative; z-index: 2; }
#rm-enter-ecover .lg-btn:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.32), inset 0 1.5px 0 rgba(255,255,255,.34), inset 0 -1px 0 rgba(255,255,255,.08), 0 8px 30px rgba(0,0,0,.55); }
#rm-enter-ecover .lg-btn:active { transform: scale(.97); }

/* ======================================================= R19b refinements (2026-11-15) ======================================================= */
/* (2) My RED -> My Profile: secondary text ~25 % brighter (rgb 144,147,158 / 147,149,162 -> x1.25); still below the "Your preferences" heading (208,209,216) */
html body #root#root .rm22-preferences .rm22-card-description { color: rgb(171, 175, 188) !important; }   /* R19c (9): desktop -5 % of the R19b value (180,184,198) */
html body #root#root .rm22-preferences dl dt { color: rgb(175, 177, 193) !important; }                    /* R19c (9): desktop -5 % of (184,186,203) */
@media (max-width: 899px) {
  html body #root#root .rm22-preferences .rm22-card-description { color: rgb(162, 166, 178) !important; } /* R19c (9): mobile -10 % */
  html body #root#root .rm22-preferences dl dt { color: rgb(166, 167, 183) !important; }
}
html body #root#root .rm22-preferences dl dt svg { color: rgb(147, 149, 162) !important; }   /* the small icons keep their approved tone; only the labels brighten */

/* (6) Chat: the microphone uses the Send arrow's own red states (r9.css values): hover on desktop, pressed on touch */
@media (hover: hover) {
  html body :is(#root, .r12-chrome) .composer__mic:hover > svg { stroke: url(#r9-send-ink) !important; filter: drop-shadow(0 0 5px #b8465380) !important; transition: filter 160ms ease, stroke 160ms ease; }
}
html body :is(#root, .r12-chrome) .composer__mic:active > svg { stroke: #d96974 !important; filter: drop-shadow(0 0 7px #b84653) !important; }

/* ======================================================= R19c refinements (2026-11-15) ======================================================= */
/* (4) Photo / 3D: each label optically centred in its segment (the selected comet ring is offset 4px outward, R32 r27.css); widths, comet and shape unchanged */
html body #root#root .r11-modes button:first-child { padding-left: 4px !important; padding-right: 8px !important; }
html body #root#root .r11-modes button:last-child { padding-left: 8px !important; padding-right: 4px !important; }
/* (10) Register / Sign In: heading and description start where the e-mail field's text starts (field inset 10px) */
html body .r14-auth-card.r14-auth-card > :is(h3, p) { padding-left: 10px !important; }   /* beats r18.css html body .r14-auth-card>:is(h3,p,.brief-field){padding-left:0!important} */
/* (10) Settings: the Account row (icon, title, buttons) lines up with the Support / Terms / Privacy icons and text */
html body #root#root .r6-account-title-row { padding-left: 17px !important; }
/* (11) My RED: Guest / Sign in to save... on the Top Matches edge (desktop); preference labels start where "Your preferences" starts (+3px) */
@media (min-width: 900px) { html body #root#root .profile-row--guest .profile-row__text { padding-left: 6px !important; } }
html body #root#root .rm22-preferences dl dt > svg { margin-right: 3px !important; }
/* (12) My RED -> Sign in: the Edit button's red crescent (R32 r26-style ::after, hidden for this button by r15.css) */
html body #root#root .profile-row__signin:after { display: block !important; }
@media (min-width: 900px) {
  /* (13) Shortlist: View 2px higher (optical alignment with heart and price) */
  html body #root#root .r15-shortlist-actions .btn.btn--primary { translate: 0 -2px; }
  /* (14) Compare picker: heading, counter, list and note start where the Search field's text starts (field inset 18px); close X and Done unchanged */
  html body .r6-compare-picker > header h2, html body .r6-compare-picker .r27-picker-count, html body .r6-compare-picker .r6-picker-list > label, html body .r6-compare-picker .r6-picker-notice { padding-left: 18px !important; box-sizing: border-box; }
  /* (15) View: Overview / Services start ~40 % further below the tabs (36 -> 51px) */
  html body #root#root .rm21-tabs + :is(.r3-overview, .r3-services) { margin-top: 51px !important; }
  /* (6) View 3D tab: ~55 % more space between the tabs and the model (28 -> 44px) */
  html body #root#root .rm21-tabs + .r5-model-viewer { margin-top: 44px !important; }
  /* (16) the Planet row of the menu is a phone-only addition */
  .app-menu__row.r19-menu-planet { display: none !important; }
}

/* ---- R19d (2026-11-15) ---- */
/* (2) Chat Send: slightly further right inside the input pill (desktop gap to the pill edge 7 -> 4 px, phone 7 -> 5 px); size, look, states unchanged. Its comet runs 20 % slower (rm-integration.js speedOf). */
html body #root .composer__send { translate: 3px 0; }
@media (max-width: 899px) { html body #root .composer__send { translate: 2px 0; } }
/* (3) My RED Overview "Sign in" = the My Profile "Edit" button (R19d-2: phone only; desktop keeps the earlier look): an older R32 layer clipped the red crescent (overflow:hidden cuts the ::after ring at inset -1px) and left it 41 px tall. */
@media (max-width: 899px) { html body #root#root .profile-row__signin { overflow: visible !important; height: 44px !important; min-height: 44px !important; box-sizing: border-box !important; line-height: normal !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; } }
/* (4) Photo / 3D: camera icon in the first segment; both segments stay 52 px wide, contents centred in each (the R19c 4 px / 8 px padding offsets each label onto the
   centre of its own highlight, which R27 extends 4 px outwards). The comet (R32 rail / conic) is untouched and follows the same ring box. */
html body #root#root .r11-modes > button { display: inline-flex !important; align-items: center !important; justify-content: center !important; }
html body #root#root .r11-modes .r19-photo-icon { display: block !important; width: 17px !important; height: 17px !important; flex: none !important; margin: 0 !important; overflow: visible; }
html body #root#root .r11-modes .r19-photo-icon { translate: 0 -1px; }
/* (8) Like / Save hearts: the Discover heart (34 px round glass button, 28 px heart, R8 outline + glow) everywhere. View (.r3-heart, was a 44 x 36 oval) and Shortlist
   (.r5-save-heart, 44 px ring with a smaller heart) take the same button; a 5 px margin keeps each control's old footprint, so its centre and the layout stay where they were. */
html body #root#root :is(.r3-heart, .r5-save-heart) {
  width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; max-width: 34px !important; max-height: 34px !important;
  padding: 0 !important; box-sizing: border-box !important; border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important; background: rgba(10, 10, 11, 0.38) !important; box-shadow: none !important;
  -webkit-backdrop-filter: blur(10px) !important; backdrop-filter: blur(10px) !important;
  display: grid !important; place-items: center !important; flex: none !important;
}
html body #root#root .r5-save-heart { margin: 5px !important; }
html body #root#root .r3-heart { margin: 1px 5px !important; }
html body #root#root :is(.r3-heart, .r5-save-heart):before, html body #root#root :is(.r3-heart, .r5-save-heart):after { content: none !important; display: none !important; }
html body #root#root :is(.r3-heart, .r5-save-heart) > svg[data-lava-heart] { width: 28px !important; height: 28px !important; transform: none !important; translate: none !important; margin: 0 !important; }

/* ---- R19d-2 (2026-11-15) ---- */
/* (4) Shortlist cards, desktop: the bottom edges of the Heart button and View sit on the price's visual line (the bottom of its digits, 935.3 px at 1440 x 1000;
   heart bottom was 947.4, View 950.4). Translate only, so sizes, designs and the row layout stay as they are. Phone layout unchanged. */
@media (min-width: 900px) {
  html body #root#root .r15-shortlist-actions .r5-save-heart { translate: 0 -12px; }
  html body #root#root .r15-shortlist-actions .btn.btn--primary { translate: 0 -17px; }
}

/* ---- R19d-4 (2026-11-15) ---- */
/* View -> dedicated 3D tab, desktop: viewer taller (350 -> 490 px; R19d-5: 650 px). The car keeps its size (the viewer frames by width) and stays centred. Phone, upper Photo/3D and Shortlist unchanged. */
@media (min-width: 900px) { html body #root#root .rm21-tabs + .r5-model-viewer { height: 650px !important; } }

/* ---- Phase 2 (2026-11-15): no grey scrollbars ---- */
/* The grey bar on the right edge was the browser's own scrollbar of the page (R32 pages scroll the document) and of the inner lists. It is hidden everywhere;
   wheel, trackpad, touch and keyboard scrolling are unchanged (nothing is set to overflow:hidden). Home's own document does the same in home/site.css. */
html, body, html body * { scrollbar-width: none !important; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, html body *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent; }

/* Phase 2c (2026-11-16): the Home frame is black before its document paints (no white frame on load / return) */
#r19-home { background: #000; color-scheme: dark; }

/* Phase 2e (2026-11-16): Safari (e.g. in Low Power Mode, when muted autoplay is held back) draws its own Play glyph over the Planet sphere video. The sphere videos have
   no controls by design; Safari's start-playback overlay is not drawn for them. The video, poster and its animation are unchanged. */
video:not([controls])::-webkit-media-controls,
video:not([controls])::-webkit-media-controls-panel,
video:not([controls])::-webkit-media-controls-overlay-play-button,
video:not([controls])::-webkit-media-controls-start-playback-button,
video:not([controls])::-webkit-media-controls-play-button { display: none !important; -webkit-appearance: none !important; opacity: 0 !important; }

/* ---- Phase 4 (2026-11-16): inside the Home page this document is the transparent navigation layer (index.html?shell=1) ---- */
html[data-r19-ovl], html[data-r19-ovl] body { background: transparent !important; }
/* the (empty) page area of the shell lets every pointer through to the Home page beneath; only the navigation controls (.r12-chrome, drawers, dialogs) take it */
html[data-r19-ovl] .app-main, html[data-r19-ovl] .app-main__inner { pointer-events: none !important; }
html[data-r19-ovl] .app-shell { pointer-events: none !important; }
html[data-r19-ovl] :is(.app-drawer, .app-drawer-backdrop, [role="dialog"]), html[data-r19-ovl] :is(.app-drawer, .app-drawer-backdrop, [role="dialog"]) * { pointer-events: auto !important; }
html[data-r19-ovl] #root { pointer-events: none !important; }
html[data-r19-ovl] .r12-chrome { pointer-events: auto !important; }
