/* Mobile accessibility hotfix — visual-only, no workflow changes.
   Scoped to the owner mobile root and the post-confirmation contact modal. */
html[data-theme="light"] #rt-contact-modal-card .rt-contact-header h2,
html[data-theme="dark"] #rt-contact-modal-card .rt-contact-header h2,
#rt-contact-modal-card .rt-contact-header h2 { color:#FFFFFF !important; opacity:1 !important; }
#rt-contact-modal-card .rt-contact-header p { color:#D1FAE5 !important; font-size:14px !important; line-height:1.55 !important; opacity:1 !important; }
html[data-theme="light"] #rt-contact-modal-card .rt-contact-label {color:#475569 !important;font-size:13px !important;}
#rt-contact-modal-card .rt-contact-btn-call,
#rt-contact-modal-card .rt-contact-btn-sms {background:#0F766E !important;color:#FFFFFF !important;font-size:15px !important;min-height:48px;}
html[data-theme="light"] #rt-contact-modal-card .rt-contact-btn-close {color:#334155 !important;font-size:14px !important;min-height:44px;}
#rt-contact-modal-card .rt-contact-phone-title {font-size:13px !important;line-height:1.5 !important;}
/* Avoid low-contrast brand-colored button labels in light mode.
   Target explicit inline teal backgrounds rather than all controls. */
html[data-theme="light"] #root button[style*="background-color: rgb(8, 184, 174)"],
html[data-theme="light"] #root [role="button"][style*="background-color: rgb(8, 184, 174)"],
html[data-theme="light"] #root button[style*="background-color: rgb(15, 118, 110)"] {color:#FFFFFF !important;}
/* Help, notes, remarks and field labels remain readable when native text is muted. */
html[data-theme="light"] #root input::placeholder,
html[data-theme="light"] #root textarea::placeholder {color:#64748B !important;opacity:1 !important;}
html[data-theme="dark"] #root input::placeholder,
html[data-theme="dark"] #root textarea::placeholder {color:#A9BACD !important;opacity:1 !important;}
/* Keyboard accessibility and tap affordance. */
#root button:focus-visible,
#rt-contact-modal-card a:focus-visible,
#rt-contact-modal-card button:focus-visible {outline:3px solid #2563EB !important;outline-offset:2px;}
@media (prefers-reduced-motion:reduce) {
 #rt-contact-modal-card, #rt-contact-modal-back {transition:none !important;}
}

/* Phase 2: readable notes, payment actions and semantic chips.
   Attribute selectors intentionally require a solid background to avoid changing
   outlined/ghost controls or the sign-in experience. */
html[data-theme="light"] #root [role="button"][style*="background-color: rgb(8, 184, 174)"],
html[data-theme="light"] #root [role="button"][style*="background-color: rgb(20, 184, 166)"],
html[data-theme="light"] #root [role="button"][style*="background-color: rgb(13, 148, 136)"],
html[data-theme="light"] #root button[style*="background-color: rgb(20, 184, 166)"],
html[data-theme="light"] #root button[style*="background-color: rgb(13, 148, 136)"] {
 color:#FFFFFF !important;
 -webkit-text-fill-color:#FFFFFF !important;
}
/* Explicitly scoped dark-on-dark status chips, only for filled badges. */
html[data-theme="light"] #root [style*="background-color: rgb(9, 36, 58)"][style*="border-radius"] {
 color:#F8FAFC;
}
/* Modal and form instructional text must wrap rather than clip. */
#rt-contact-modal-card .rt-contact-header p,
#rt-contact-modal-card .rt-contact-row,
#root textarea,
#root [role="alert"] {
 overflow-wrap:anywhere;
}
#rt-contact-modal-card .rt-contact-row {gap:12px;}
#rt-contact-modal-card .rt-contact-val {text-align:right;}
#rt-contact-modal-card .rt-contact-btn-close {min-height:44px;}
/* Keep native form labels visible at standard mobile zoom levels. */
#root input, #root textarea, #root select {min-width:0;}

/* Model type labels use their semantic color rather than white on white. */
/* Solid CTA labels are commonly nested spans/divs in RN Web. */
html[data-theme="light"] #root #rt-bookings-new-btn,
html[data-theme="light"] #root #rt-fleet-add-btn,
html[data-theme="light"] #root #rt-portal-copy-btn,
html[data-theme="light"] #root #rt-push-enable-btn {
 color:#FFFFFF !important;
}
html[data-theme="light"] #root #rt-bookings-new-btn *,
html[data-theme="light"] #root #rt-fleet-add-btn *,
html[data-theme="light"] #root #rt-portal-copy-btn *,
html[data-theme="light"] #root #rt-push-enable-btn * {
 color:#FFFFFF !important;
 -webkit-text-fill-color:#FFFFFF !important;
 opacity:1 !important;
}
html[data-theme="light"] #root .rt-light-muted-text {color:#475569 !important;}
/* Contact modal is injected outside #root and needs separate light-theme handling. */
html[data-theme="light"] #rt-contact-modal-card .rt-contact-header h2,
html[data-theme="light"] #rt-contact-modal-card .rt-contact-header p {
 color:#FFFFFF !important;
 -webkit-text-fill-color:#FFFFFF !important;
}
html[data-theme="light"] #rt-contact-modal-card .rt-contact-btn-call,
html[data-theme="light"] #rt-contact-modal-card .rt-contact-btn-sms {
 color:#FFFFFF !important;
 -webkit-text-fill-color:#FFFFFF !important;
}
html[data-theme="light"] #rt-contact-modal-card .rt-contact-phone-title {color:#115E59 !important;}
html[data-theme="light"] #rt-contact-modal-card .rt-contact-phone-number {color:#075985 !important;}
/* Avoid truncation of long payment remarks and notes. */
#rt-contact-modal-card .rt-contact-detail-box,
#rt-contact-modal-card .rt-contact-header {overflow-wrap:break-word;}


/* Owner mobile: solid brand CTAs retain white labels across both themes.
   Only solid buttons; outlined and ghost buttons remain unchanged. */
#root :is(button,[role="button"]):is(
 [style*="background-color: rgb(8, 184, 174)"],
 [style*="background-color: rgb(20, 184, 166)"],
 [style*="background-color: rgb(13, 148, 136)"],
 [style*="background-color: rgb(15, 118, 110)"],
 [style*="background-color: rgb(37, 99, 235)"],
 [style*="background-color: rgb(22, 101, 207)"],
 [style*="background-color: rgb(2, 132, 199)"],
 [style*="background-color: #08B8AE"],
 [style*="background-color: #0F766E"],
 [style*="background-color: #2563EB"]
),
#root :is(.btn-primary,.rt-native-btn-submit) {
 color:#FFFFFF !important;
 -webkit-text-fill-color:#FFFFFF !important;
}
#root :is(button,[role="button"]):is(
 [style*="background-color: rgb(8, 184, 174)"],
 [style*="background-color: rgb(20, 184, 166)"],
 [style*="background-color: rgb(13, 148, 136)"],
 [style*="background-color: rgb(15, 118, 110)"],
 [style*="background-color: rgb(37, 99, 235)"],
 [style*="background-color: rgb(2, 132, 199)"],
 [style*="background-color: #08B8AE"],
 [style*="background-color: #0F766E"],
 [style*="background-color: #2563EB"]
) :is(span,svg,svg *,[dir="auto"]),
#root .btn-primary :is(span,svg,svg *) {
 color:#FFFFFF !important;
 -webkit-text-fill-color:#FFFFFF !important;
}
/* White-centered status pills; preserve semantic text and outline hues. */
#root :is(:is(.rt-booking-status-pill, [data-rt-class="rt-booking-status-pill"]),:is(.rt-fleet-type-tag, [data-rt-class="rt-fleet-type-tag"])),
#root :is(:is(.rt-booking-status-pill, [data-rt-class="rt-booking-status-pill"]),:is(.rt-fleet-type-tag, [data-rt-class="rt-fleet-type-tag"]))[style] {
 background:#FFFFFF !important;
 background-color:#FFFFFF !important;
}
/* Preserve existing semantic label color on model tags. */

/* Ensure existing status semantics are retained when white-filled. */
#root :is(.rt-booking-status-pill-text, [data-rt-class="rt-booking-status-pill-text"]),
#root :is(.rt-fleet-type-tag-text, [data-rt-class="rt-fleet-type-tag-text"]) {
 opacity:1 !important;
}
/* Avoid inheriting the generic card text color over semantic status colors. */

/* Specificity-safe mobile status chips: white center, semantic border/text untouched. */
html[data-theme="light"] #root :is(.rt-booking-status-pill, [data-rt-class="rt-booking-status-pill"]),
html[data-theme="dark"] #root :is(.rt-booking-status-pill, [data-rt-class="rt-booking-status-pill"]),
html[data-theme="light"] #root :is(.rt-fleet-type-tag, [data-rt-class="rt-fleet-type-tag"]),
html[data-theme="dark"] #root :is(.rt-fleet-type-tag, [data-rt-class="rt-fleet-type-tag"]) {
 background:#FFFFFF !important;
 background-color:#FFFFFF !important;
}

/* Semantic outlined pills: keep label and border hues; remove colored interior. */
#root :is(.status-pill,.status-badge,.status-chip,.vehicle-type-tag,.vehicle-class-tag,:is(.rt-booking-status-pill, [data-rt-class="rt-booking-status-pill"]),:is(.rt-fleet-type-tag, [data-rt-class="rt-fleet-type-tag"])):not(button):not([role="button"]) {
 background-color:#FFFFFF !important;
 background-image:none !important;
}

/* Shared solid-action treatment, including modal portals outside the Expo root.
   The palette bridge marks saturated green/teal/blue backgrounds, not ghost controls. */
html body .rt-solid-color-action.rt-solid-color-action.rt-solid-color-action,
html body .rt-solid-color-action.rt-solid-color-action.rt-solid-color-action :is(span,div,strong,small,svg,svg *),
html body #root .rt-solid-color-action.rt-solid-color-action.rt-solid-color-action,
html body #root .rt-solid-color-action.rt-solid-color-action.rt-solid-color-action :is(span,div,strong,small,svg,svg *) {
 color:#FFFFFF !important;
 -webkit-text-fill-color:#FFFFFF !important;
}
/* White vehicle capsules need a colored label; the existing blue outline is retained. */
html body #root :is(.rt-fleet-type-tag-text, [data-rt-class="rt-fleet-type-tag-text"]) {
 color:#0369A1 !important;
 -webkit-text-fill-color:currentColor !important;
}
html body #root :is(:is(.rt-booking-status-pill-text, [data-rt-class="rt-booking-status-pill-text"]),:is(.rt-fleet-status-tag-text, [data-rt-class="rt-fleet-status-tag-text"])) {
 -webkit-text-fill-color:currentColor !important;
}
html body #root :is(.rt-fleet-status-tag, [data-rt-class="rt-fleet-status-tag"]) {
 background:#FFFFFF !important;
}

/* Review and calendar status capsules are rendered outside the Expo root. */
html body .rt-semantic-pill,
html body #root [data-rt-class="rt-semantic-pill"] {
 background:#FFFFFF !important;
 background-image:none !important;
 -webkit-text-fill-color:currentColor !important;
}

/* The cyan install action uses a gradient and bypasses the solid palette bridge. */
html body #rt-btn-install {color:#FFFFFF !important;-webkit-text-fill-color:#FFFFFF !important;}
