/* REPPTRADE v4.4.15: Catalogue/Library detail theme parity and light text contrast.
   Palette and gradient come ONLY from showThemeVars(), just as compact boots.
   No overlays or click-intercepting elements. */

body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity{
  background:#0d1c2c!important;
  color:#f4f7fb!important;
  border:1px solid #34526b!important;
  border-radius:7px!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .showmodal-head{
  background:#13273c!important;
  color:#f8fbff!important;
  border-bottom:1px solid #37546b!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity #catalogueDetailTitle{
  background:transparent!important;border:0!important;
  padding:0!important;margin:0!important;
  color:#fff!important;font-weight:800!important;
  text-transform:uppercase!important;
  line-height:1.3!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .showmodal-body,
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity #catalogueDetailBody{
  background:#0d1c2c!important;color:#f4f7fb!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity #catalogueDetailBody{
  padding:20px!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface{
  --rc415-dark-panel:#0e1621;
  display:block!important;
  border:3px solid transparent!important;
  border-radius:5px!important;
  padding:13px!important;
  /* THE SAME PRIMARY→SECONDARY BORDER AND BOOT SURFACE AS THE LIBRARY. */
  background:var(--show-boot-bg,var(--show-solid,#14273e)) padding-box,
             var(--show-easy-border,linear-gradient(135deg,#2478aa,#a974c9)) border-box!important;
  color:var(--rc415-detail-ink,#fff)!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-record-top{
  background:#0a111a!important;
  border:0!important;border-left:5px solid var(--show-accent,#6ea8d8)!important;
  padding:16px 18px!important;margin:0 0 15px!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-record-top h3{
  color:#fff!important;background:transparent!important;
  font:800 19px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;
  text-transform:uppercase!important;margin:0 0 10px!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-record-top :is(.rc440-kicker,.rc440-mini){color:#c0d1e2!important}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .catalogue-detail-grid{
  background:transparent!important;
  color:inherit!important;
  grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .catalogue-detail-box{
  padding:12px 14px!important;
  min-width:0!important;
  background:#0e1621!important;
  border:1px solid #354f67!important;
  border-left:3px solid var(--show-accent,#70a8d7)!important;
  border-radius:2px!important;
  color:#fff!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .catalogue-detail-box .label{
  color:#b2c4d6!important;
  font:650 10px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;
  letter-spacing:.9px!important;text-transform:uppercase!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .catalogue-detail-box .value{
  color:#fff!important;font:600 13px/1.45 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section{
  background:transparent!important;color:inherit!important;
  grid-column:1/-1!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section h3{
  color:var(--rc415-detail-ink,#fff)!important;
  background:transparent!important;
  border-bottom:1px solid color-mix(in srgb,var(--show-accent,#8bb7d5) 65%,transparent)!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section h3 small{
  color:var(--rc415-detail-ink,#fff)!important;opacity:.83!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section :is(.rc440-cast-member,.rc440-notes){
  background:#0e1621!important;color:#fff!important;
  border:1px solid #354f67!important;
  border-left:3px solid var(--show-accent,#70a8d7)!important;
  border-radius:2px!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section .rc446-cast-actor{color:#fff!important}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section .rc446-cast-role{color:#d9e8f8!important}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .showmodal-actions{
  background:#111b27!important;border-top:1px solid #344358!important;
  padding:12px 15px!important;gap:7px!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .showmodal-actions .btn{
  background:#13263a!important;color:#fff!important;
  border:1px solid var(--show-accent,#70a8d7)!important;
  border-radius:0!important;
  min-height:37px!important;padding:9px 13px!important;
  font:700 11px/1.2 Consolas,'Courier New',monospace!important;
  text-transform:uppercase!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .showmodal-actions .btn:is(.primary,.gold){
  background:var(--show-accent,#6ea8d8)!important;
  color:var(--show-accent-ink,#0e1929)!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-upload button{
  background:#122238!important;color:#fff!important;
  border:1px solid var(--show-accent,#70a8d7)!important;
  border-radius:0!important;font:700 11px/1.2 Consolas,'Courier New',monospace!important;
  text-transform:uppercase!important;min-height:37px!important;
}
/* Easy Readability: keep the same neutral interior + colourful primary-secondary
   rim as the actual easy-readable Library detail card. */
body[data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface{
  background:linear-gradient(#141b26,#141b26) padding-box,
             var(--show-easy-border,linear-gradient(135deg,#547da4,#bb84cb)) border-box!important;
  --rc415-detail-ink:#fff;
}

/* LIGHT MODE: one clear contrast strategy. The production artwork/outer gradient
   remains themed, while data cells are dark with WHITE copy. Headings placed
   directly on a coloured/light area use computed ink (black for light palettes).
   Not the pale grey-blue copy previously forced by v4.4.11 selectors. */
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity,
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity :is(.showmodal-body,#catalogueDetailBody){
  background:#edf3fa!important;color:#173148!important;
}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .showmodal-head{
  background:#e4eef9!important;color:#142c43!important;border-bottom-color:#bfd0e1!important;
}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity #catalogueDetailTitle{color:#163049!important}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface{
  background:var(--show-boot-bg,var(--show-solid,#9bc2e2)) padding-box,
             var(--show-easy-border,linear-gradient(135deg,#2478aa,#b88de0)) border-box!important;
}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .catalogue-detail-box,
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section :is(.rc440-cast-member,.rc440-notes){
  background:#0e1621!important;color:#fff!important;
  border-color:#354f67!important;border-left:3px solid var(--show-accent,#70a8d7)!important;
}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity :is(.catalogue-detail-box .label,.rc440-mini){color:#bdcee0!important}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .catalogue-detail-box .value,
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section .rc446-cast-actor{color:#fff!important}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section .rc446-cast-role{color:#dae9fa!important}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section h3,
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc440-section h3 small{
 color:var(--rc415-detail-ink,#102c43)!important;opacity:1!important;
}
/* The screenshots demonstrate white-on-light section headings and muted copy.
   Respect per-show luminance in NON-Easy light mode, and keep easy-readability
   headings dark when its surface is white. */
body[data-surface="light"][data-ui-theme="modern"]:not(.easy-readability) .rc451-record-detail .rc440-section h3,
body[data-surface="light"][data-ui-theme="modern"]:not(.easy-readability) .rc451-record-detail .rc440-section h3 small,
body[data-surface="light"][data-ui-theme="modern"]:not(.easy-readability) .rc451-record-detail .rc440-upload span{
  color:var(--rc415-detail-ink,#142d46)!important;opacity:1!important;
  text-shadow:none!important;
}
body[data-surface="light"][data-ui-theme="modern"] .rc451-record-detail .rc440-field :is(span,strong),
body[data-surface="light"][data-ui-theme="modern"] .rc451-record-detail .rc440-cast-member :is(.rc446-cast-actor,.rc446-cast-role),
body[data-surface="light"][data-ui-theme="modern"] .rc451-record-detail .rc440-notes{
  color:#fff!important;
}
body[data-surface="light"][data-ui-theme="modern"] .rc451-record-detail .rc440-field span{
  color:#c6d6e6!important;
}
body[data-surface="light"][data-ui-theme="modern"] .rc451-record-detail .rc440-cast-member .rc446-cast-role{color:#d6e6f6!important}
body[data-surface="light"][data-ui-theme="modern"] .rc451-record-detail .rc440-record-top :is(.rc440-kicker,.rc440-mini){color:#c3d4e8!important}
body[data-surface="light"][data-ui-theme="modern"].easy-readability .rc451-record-detail .rc440-section h3,
body[data-surface="light"][data-ui-theme="modern"].easy-readability .rc451-record-detail .rc440-section h3 small,
body[data-surface="light"][data-ui-theme="modern"].easy-readability .rc451-record-detail .rc440-upload span{
  color:#1c364f!important;opacity:1!important;
}
body[data-surface="light"][data-ui-theme="modern"].easy-readability .rc451-record-detail .rc440-field :is(span,strong),
body[data-surface="light"][data-ui-theme="modern"].easy-readability .rc451-record-detail .rc440-cast-member :is(.rc446-cast-actor,.rc446-cast-role),
body[data-surface="light"][data-ui-theme="modern"].easy-readability .rc451-record-detail .rc440-notes{color:#1b364d!important}
body[data-surface="light"][data-ui-theme="modern"].easy-readability .rc451-record-detail .rc440-field span{color:#526b82!important}
@media(max-width:650px){
 body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity #catalogueDetailBody{padding:10px!important}
 body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .catalogue-detail-grid{grid-template-columns:1fr!important}
 body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface{padding:10px!important}
}
/* Older v4.4.14 selectors include the Light Mode class in their specificity.
   Explicitly outrank them for this ONE modal rather than changing every modal. */
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-section{
  background:transparent!important;color:var(--rc415-detail-ink,#172e45)!important;
}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-section :is(h3,h3 small){
  background:transparent!important;color:var(--rc415-detail-ink,#172e45)!important;
}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-section :is(.rc440-cast-member,.rc440-notes){
  background:#0e1621!important;color:#fff!important;
  border:1px solid #354f67!important;border-left:3px solid var(--show-accent,#70a8d7)!important;
}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-section :is(.rc446-cast-actor,.rc446-cast-role){color:#fff!important}
body[data-surface="light"][data-ui-theme="modern"] #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-section .rc446-cast-role{color:#d6e6f6!important}

/* Match the LIGHT Easy Readability style of the Library recording detail. */
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface{
  --rc415-detail-ink:#19374e;
  background:linear-gradient(#fff,#fff) padding-box,
             var(--show-easy-border,linear-gradient(135deg,#547da4,#bb84cb)) border-box!important;
  color:#19374e!important;
}
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-record-top{
  background:#f3f7fc!important;border-left-color:var(--show-accent,#70a8d7)!important;
}
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-record-top h3{
  color:#152e48!important;
}
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-record-top :is(.rc440-mini,.rc440-kicker){color:#4b677f!important}
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .catalogue-detail-box,
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-section :is(.rc440-cast-member,.rc440-notes){
  background:#fff!important;color:#19374e!important;
  border:1px solid #b5cbdc!important;border-left:3px solid var(--show-accent,#70a8d7)!important;
}
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .catalogue-detail-box .label{color:#526b82!important}
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .catalogue-detail-box .value,
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-section :is(.rc446-cast-actor,.rc446-cast-role){color:#19374e!important}
body[data-surface="light"][data-ui-theme="modern"].easy-readability #catalogueDetailModal.rc451-master-themed.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-upload button{
  background:#fff!important;color:#23425e!important;
}
/* The old catalogue cast grid used content-box children; with larger actor
   padding those could spill under the next section heading. */
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-cast-grid{
  display:grid!important;grid-template-columns:repeat(auto-fill,minmax(200px,1fr))!important;
  gap:8px!important;align-items:stretch!important;height:auto!important;
}
body[data-ui-theme="modern"] #catalogueDetailModal.rc415-catalogue-parity .rc415-catalogue-detail-surface .rc440-cast-grid>.rc440-cast-member{
  box-sizing:border-box!important;height:auto!important;min-height:0!important;
}
