/* REPPTRADE Admin 4.4.51 / Viewer 2.16 — role visual parity.
   Based on Master Catalogue's actual repp4433-role-card markup and showThemeVars.
   Scope strictly to Library roles and role-specific dialogs. */
#libraryCast .rc443-role-grid{grid-template-columns:repeat(auto-fill,minmax(265px,1fr));gap:11px}
#libraryCast .rc443-role-card.rc451-library-role-match{
 display:grid;grid-template-columns:85px minmax(0,1fr);align-items:stretch;
 gap:15px;min-height:110px;padding:0 12px 0 0;isolation:isolate;
 border:1px solid var(--show-accent,#678bb8)!important;border-radius:1px!important;
 background:var(--show-tile-bg,var(--show-solid,#11263e))!important;
 color:var(--show-title-ink,#fff)!important;overflow:hidden;
 transition:transform .25s ease,box-shadow .25s ease!important;
}
#libraryCast .rc443-role-card.rc451-library-role-match::before,
#libraryCast .rc443-role-card.rc451-library-role-match::after{content:none!important;display:none!important}
#libraryCast .rc451-library-role-match .rc443-role-card-art.repp4433-role-art{
 display:block;width:85px;height:100%;min-height:109px;max-width:none;
 box-sizing:border-box;border:0!important;border-right:1px solid var(--show-accent,#678bb8)!important;
 border-radius:0!important;background-color:rgba(12,20,32,.48);background-position:center;
 background-size:cover;align-self:stretch;
}
#libraryCast .rc451-library-role-match .rc443-role-card-copy{
 display:flex;min-width:0;flex-direction:column;justify-content:center;
 gap:6px;padding:9px 0;position:relative;z-index:1;
}
#libraryCast .rc451-library-role-match .rc443-role-card-copy strong{
 color:var(--show-title-ink,#fff)!important;
 font:800 13px/1.25 system-ui,sans-serif!important;text-transform:uppercase;
 -webkit-text-fill-color:var(--show-title-ink,#fff)!important;
}
#libraryCast .rc451-library-role-match .rc443-role-card-copy :is(span,small){
 color:var(--show-title-ink,#fff)!important;
 -webkit-text-fill-color:var(--show-title-ink,#fff)!important;
 font:550 11px/1.4 system-ui,sans-serif!important;
}
@media(hover:hover) and (pointer:fine){
 #libraryCast .rc451-library-role-match:is(:hover,:focus-visible){transform:translateY(-2px) scale(1.015);box-shadow:0 12px 24px #0006;z-index:2}
}
/* Readability on hover: do not override text on very pale tiles without a scrim;
   Master Catalogue uses the theme ink as the base, so preserve it here. */
#libraryCast .rc451-library-role-match:is(:hover,:focus-visible) .rc443-role-card-copy :is(strong,span,small){
 color:var(--show-title-ink,#fff)!important;-webkit-text-fill-color:var(--show-title-ink,#fff)!important;
}
/* Library + Viewer role popup: show palette across the window and header. */
#rc440Overlay .rc440-window.rc451-themed-role-window{
 border:2px solid var(--show-accent,#678bb8)!important;
 border-radius:2px!important;
 background:color-mix(in srgb,var(--show-solid,#16253b) 27%,#0d1724 73%)!important;
}
#rc440Overlay .rc451-themed-role-window>.rc440-head{
 display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
 gap:5px 15px!important;align-items:center;min-height:95px!important;
 padding:17px 24px!important;border-bottom:2px solid var(--show-accent,#678bb8)!important;
 background:var(--show-solid,#182f48)!important;
 color:var(--show-title-ink,#fff)!important;position:relative;isolation:isolate;
}
#rc440Overlay .rc451-themed-role-window>.rc440-head::after,
#repp4433Details .repp451-themed-role>header::after{
 content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:linear-gradient(90deg,var(--show-solid,#182f48) 45%,transparent),var(--rc451-role-header-art,none) center/cover no-repeat;
 opacity:.12;
}
#rc440Overlay .rc451-themed-role-window.rc451-role-has-logo>.rc440-head{
 grid-template-columns:57px minmax(0,1fr) auto!important;
}
#rc440Overlay .rc451-themed-role-window.rc451-role-has-logo>.rc440-head::before{
 content:"";grid-column:1;grid-row:1 / span 2;display:block;
 width:54px;height:58px;border:1px solid var(--show-accent,#678bb8);
 background:var(--rc451-role-logo,none) center/cover no-repeat;
}
#rc440Overlay .rc451-themed-role-window>.rc440-head #rc440Kind{
 grid-column:1;grid-row:2;font:800 11px/1.3 system-ui,sans-serif!important;
 color:var(--show-title-ink,#fff)!important;opacity:.8;letter-spacing:.09em!important;
}
#rc440Overlay .rc451-themed-role-window>.rc440-head h2{
 display:block!important;grid-column:1;grid-row:1;margin:0!important;
 font:900 24px/1.2 system-ui,sans-serif!important;
 color:var(--show-title-ink,#fff)!important;letter-spacing:.01em;
}
#rc440Overlay .rc451-themed-role-window.rc451-role-has-logo>.rc440-head :is(h2,#rc440Kind){grid-column:2}
#rc440Overlay .rc451-themed-role-window>.rc440-head #rc440Close{
 grid-column:2;grid-row:1 / span 2;
 background:#061323!important;color:white!important;border:1px solid #dce6f0!important;
 border-radius:1px!important;z-index:2;
}
#rc440Overlay .rc451-themed-role-window.rc451-role-has-logo>.rc440-head #rc440Close{grid-column:3}
#rc440Overlay .rc451-themed-role-window>.rc440-body{
 background:color-mix(in srgb,var(--show-solid,#26394e) 22%,#101c2a 78%)!important;
}
#rc440Overlay .rc451-themed-role-window .rc451-role-detail>.rc443-role-header{
 background:var(--show-tile-bg,var(--show-solid))!important;
 border:1px solid var(--show-accent,#678bb8)!important;
 border-left:4px solid var(--show-accent,#678bb8)!important;
 padding:15px!important;
}
#rc440Overlay .rc451-themed-role-window .rc447-section-title{border-color:var(--show-accent,#678bb8)!important}
#rc440Overlay .rc451-themed-role-window .rc451-person-group{border-color:var(--show-accent,#678bb8)!important}
/* Master Catalogue role popup: themed show header and full-window body.
   Actor profiles remain untouched and reset on each navigation. */
#repp4433Details .repp4433-dialog.repp451-themed-role{
 background:color-mix(in srgb,var(--show-solid,#26394e) 22%,#101c2a 78%)!important;
 border:2px solid var(--show-accent,#678bb8)!important;
 border-radius:2px!important;
}
#repp4433Details .repp451-themed-role>header{
 display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;
 min-height:94px;gap:10px 14px;padding:17px 22px!important;
 background:var(--show-solid,#19324b)!important;
 border-bottom:2px solid var(--show-accent,#678bb8)!important;
 position:relative;isolation:isolate;
}
#repp4433Details .repp451-themed-role.repp451-role-has-logo>header{grid-template-columns:58px minmax(0,1fr) auto}
#repp4433Details .repp451-themed-role.repp451-role-has-logo>header::before{
 content:"";width:54px;height:58px;display:block;grid-column:1;grid-row:1;
 background:var(--repp451-role-logo,none) center/cover no-repeat;
 border:1px solid var(--show-accent,#678bb8);
}
#repp4433Details .repp451-themed-role>header::after{background-image:linear-gradient(90deg,var(--show-solid,#182f48) 45%,transparent),var(--repp451-role-header-art,none)}
#repp4433Details .repp451-themed-role>header>div{grid-column:1;grid-row:1;min-width:0}
#repp4433Details .repp451-themed-role.repp451-role-has-logo>header>div{grid-column:2}
#repp4433Details .repp451-themed-role>header #repp4433Close{
 grid-column:2;grid-row:1;z-index:1;background:#061323!important;color:#fff!important;
}
#repp4433Details .repp451-themed-role.repp451-role-has-logo>header #repp4433Close{grid-column:3}
#repp4433Details .repp451-themed-role>header :is(#repp4433DetailsTitle,#repp4433DetailsKicker){
 color:var(--show-title-ink,#fff)!important;-webkit-text-fill-color:var(--show-title-ink,#fff)!important;
}
#repp4433Details .repp451-themed-role>header #repp4433DetailsTitle{font-size:24px!important}
#repp4433Details .repp451-themed-role .repp4433-detail-body{background:transparent!important}
#repp4433Details .repp451-themed-role .repp4433-role-person{
 border:1px solid var(--show-accent,#678bb8)!important;
 border-left:4px solid var(--show-accent,#678bb8)!important;
 background:color-mix(in srgb,var(--show-solid,#26394e) 16%,#0a1728 84%)!important;
}
@media(max-width:700px){
 #libraryCast .rc443-role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #libraryCast .rc451-library-role-match{grid-template-columns:64px minmax(0,1fr)!important;gap:10px!important;min-height:94px!important}
 #libraryCast .rc451-library-role-match .rc443-role-card-art{width:64px!important;min-height:94px!important}
 #libraryCast .rc451-library-role-match .rc443-role-card-copy strong{font-size:12px!important}
 #rc440Overlay .rc451-themed-role-window>.rc440-head{min-height:80px!important;padding:12px 15px!important}
 #rc440Overlay .rc451-themed-role-window>.rc440-head h2{font-size:19px!important}
 #repp4433Details .repp451-themed-role>header{padding:12px 14px!important}
}
@media(max-width:410px){#libraryCast .rc443-role-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#libraryCast .rc451-library-role-match{transition:none!important}}

/* Viewer has its own role header wrapper; use the same palette and accent. */
body.repp-viewer #rc440Overlay .rc451-themed-role-window .viewer-role-heading{
 background:var(--show-tile-bg,var(--show-solid))!important;
 border:1px solid var(--show-accent,#678bb8)!important;
 border-left:4px solid var(--show-accent,#678bb8)!important;
 padding:15px!important;
}
body.repp-viewer #rc440Overlay .rc451-themed-role-window .viewer-role-heading :is(h3,p){
 color:var(--show-title-ink,#fff)!important;
}
body.repp-viewer #rc440Overlay .rc451-themed-role-window .viewer-person-group{
 border-color:var(--show-accent,#678bb8)!important;
}
