/* Split out of the old monolithic styles.css -- this file is loaded
   only by its own sub-module page, after the shared ../styles.css. */
.border_Exclusive img {
    border: 8px solid #cccc3d !important;
}

.vignetteSelected {
    box-shadow: 0px 0px 0px 4px #d2d2d2 !important;
}

.vignetteSelected_BackgroundColor {
    background-color: #d2d2d2 !important;
    color: var(--color16) !important;
}

/* .planetSelected {
    box-shadow: 0px 0px 0px 8px #d2d2d2 !important;
} */

.planetSelected img {
    border: 8px solid #d2d2d2 !important;
}

#content-CR::-webkit-scrollbar {
    display: block;
    width: 14px;
    height: 14px;
}

#content-CR::-webkit-scrollbar-track {
    background: var(--scrollbarBG);
} 

#content-CR::-webkit-scrollbar-thumb {
    background-color: var(--thumbBG) ;
    border-radius: 0px;
    border: 1px solid var(--scrollbarBG);
}

#content-CR {
    scrollbar-color: var(--thumbBG) var(--scrollbarBG);
}

#content-CR {
    position: relative;
    width: 100%;
    height: 100%;
    animation: show 0.5s ease-out;
    user-select: none;
    overflow-y: auto;
}

#innerCRInfos {    
    position: absolute;
    bottom: 0px;
    /* width: 400px; */
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    box-sizing: border-box;
}

#innerCRInfos > div {    
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

#lockedNotif > img{
    width: 20px;
}

.content-tool-wrapper {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translate(-50%, 0%);
    width: 250px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: var(--borderColor31);
    clip-path: polygon(0 0, 100% 0, 75% 100%, 25% 100%);
}

.content-tool-wrapper > div {
    width: calc(250px - 2%);
    height: calc(32px - 2%);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #181818;
    clip-path: polygon(1% 0, 99% 0, 74% 100%, 26% 100%);
}

.content-tool-wrapper img {
    width: 20px;
}

.content-tool-wrapper span {
    line-height: 20px;
}

#content-CR > svg {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#content-CR > svg > line {
    stroke-width: 2;
}

.mat_colWrapper {
    display: flex;
    justify-content: space-evenly;   /* SC board design: even air, edges included */
    align-items: center;
    width: 100%;
    height: auto;
    min-height: 100%;
}

.mat_colWrapper > div {
    z-index: 10;
}

/* Chain focus (kept from the Atlas experiment): while a relation walk
   is showing -- hover or SHIFT-lock -- every vignette OUTSIDE the
   walked chain fades, so the matched chain pops. Plain-click selected
   vignettes stay half-visible; everything restores on mouseout because
   the JS removes .highlighted, no script change involved. */
#content-CR:has(.vignette.highlighted) .vignette:not(.highlighted) {
    opacity: 0.18;
}
#content-CR:has(.vignette.highlighted) .vignette.selected:not(.highlighted) {
    opacity: 0.55;
}
#content-CR:has(.vignette.highlighted) .planet:not(.highlighted) {
    opacity: 0.3;
}
/* the P0 -> P1 arrows fade with their pair: a small observer in
   relations.js marks an arrow .arrowlit when BOTH its raw and basic
   vignettes are in the walked chain */
#content-CR:has(.vignette.highlighted) .arrow:not(.arrowlit) {
    opacity: 0.18;
}
.vignette, .planet, .arrow { transition: opacity 0.12s linear; }

/** Tier Titles -- SC board design: uppercase name flush with the
    column's left edge, tier badge ending at its right edge. Still
    absolutely pinned to the top of the board, as before. **/
.mat_TierTitle {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    width: 180px;
    margin: 9px;
    padding: 0;
    background: none;
    opacity: 1;
    user-select: none;
}

.mat_TierTitleSpanTitle {
    font-variant: normal;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 0.8571em;
    letter-spacing: 0.1em;
    color: var(--textColor);
}

.mat_TierTitleSpanTier {
    font-family: 'Shentox SemiBold';
    font-weight: 400;
    font-size: 0.7143em;
    color: #d2d2d2a0;
    background-color: #d2d2d221;
    padding: 1px 7px;
}

#mat_Planets {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    align-items: flex-start;
}

#mat_Planets img {
    box-sizing: border-box;   /* the ring border counts inside the size */
    /* 25% up from 68px, shrinking with the viewport height so the
       8-planet stack always fits: (available height - gaps) / 8 */
    width: clamp(48px, 12.5vh - 27px, 85px);
    height: clamp(48px, 12.5vh - 27px, 85px);
    box-shadow: 0px 0px 0px 4px transparent;
    border: 8px solid transparent;
    border-radius: 100%;
}

.planetTypeNames {
    width: auto !important;
    display: flex;
    flex-grow: 0;
    flex-direction: row;
    justify-content: flex-start;
}

.planetTypeNames span {
    font-size: 0.9em;
    color: var(--themeColor);
}

#mat_RawBasic {
    display: flex;
}

/*** VIGNETTES ***/
/* .vignette {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    height: 30px;
    width: 232px;
    margin: 8px;
} */

.planet {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    height: 27px;
    width: 27px;
    color: #000000;
    font-family: 'Shentox Regular';
    
    background-color: #999999;
    margin: 16px 9px;
    border-radius: 7px;
}

.vignette {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 180px;
    height: 27px;
    margin: 16px 9px;
}

/* planets are spaced by their column's own gap */
.vignette.planet {
    margin: 0;
    width: auto;
    height: auto;
}

.vignette-mat {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 180px;
    height: 27px;
    
    background-color: #999999;
    border-bottom-left-radius: 7px;
    border-top-left-radius: 7px;
}

.vignette-input,
.vignette-output {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 13px;
    height: 27px;
    background-color: #d2d2d2;
    color: #000000;
    font-size: .78em;
    border-radius: 7px;
    visibility: hidden;
    cursor: url(../img/cursors/cursor_pointer.svg), pointer;
}

.vignette-input {
    /* margin-right: 2px; */
    top: 0;
    left: -18px;
}

.vignette-output {
    /* margin-left: 2px; */
    top: 0;
    right: -18px;
}

.vignette-img {
    display: flex;
    flex-shrink: 0;
    flex-wrap: nowrap;
    height: 27px;
    width: 27px;
}

.vignette-body {
    display: flex;
    flex-direction: column;
    height: 27px;
    width: 100%;
}

.vignette-body-title {
    flex-shrink: 0;
    height: 13.5px;
    text-align: center;
    color: #000000;
    line-height: 13.5px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: 'Shentox Regular';
}

.vignette-body-infos {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    height: 13.5px;
    border-top-left-radius: 7.2px;
    background-color: #212121;
    font-size: 11.5px;
    color: #999999;
    line-height: 13.5px;
    font-weight: 600;
}

.vignette-body-infos-qty {
    margin-left: 2px;
}

.vignette-body-infos-price {
    margin-left: auto;
    margin-right: 2px;
}

/*** CR MOBILE FLOW -- the small-screen mode of this same page. Hidden
     on desktop; below 700px the board hides and this renders (built by
     script.js from the board's own vignettes). Pure Atlas: search box,
     tier tabs, commodity pages with the full production tree. ***/
#crMobile { display: none; }

.crm_top {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #313131;
    background-color: #00000042;
}

.crm_title {
    font-family: 'Shentox Light', 'Segoe UI', sans-serif;
    font-size: 1.05em;
    letter-spacing: 2px;
    color: #d2d2d263;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.crm_sp { flex: 1; }

.crm_back {
    width: 28px;
    height: 28px;
    border: 1px solid #313131;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #474747;
    cursor: url(../img/cursors/cursor_pointer.svg), pointer;
    flex-shrink: 0;
}
.crm_back:hover { color: #d2d2d2; }

.crm_ghostbtn {
    display: inline-block;
    border: 1px solid #313131;
    color: #474747;
    font-size: 0.7143em;
    letter-spacing: 1px;
    padding: 5px 10px;
    cursor: url(../img/cursors/cursor_pointer.svg), pointer;
    text-transform: uppercase;
    flex-shrink: 0;
}
.crm_ghostbtn:hover { color: #d2d2d2; }

.crm_searchwrap { padding: 12px 14px 4px; flex-shrink: 0; position: relative; }

.crm_searchbox {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    background-color: #000000a8;
    border: 1px solid #313131;
    padding: 0 13px;
}
.crm_searchbox:focus-within { border-color: #d2d2d2; }
.crm_searchbox svg { width: 15px; height: 15px; stroke: #999999; fill: none; stroke-width: 2; flex-shrink: 0; }
.crm_searchbox input {
    flex: 1;
    background: none;
    border: 0;
    outline: none;
    font-family: inherit;
    font-size: 1em;
    color: #d2d2d2;
    min-width: 0;
}
.crm_searchbox input::placeholder { color: #666666; }

#crm_sres {
    position: absolute;
    left: 14px; right: 14px;
    top: calc(100% - 2px);
    background-color: #0d0d0df2;
    border: 1px solid #313131;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 30;
}
#crm_sres.on { display: block; }

.crm_tierbar { display: flex; gap: 3px; padding: 10px 14px 8px; flex-shrink: 0; overflow-x: auto; }
.crm_tab {
    padding: 5px 11px;
    background: none;
    border: 1px solid #313131;
    font-family: inherit;
    font-size: 0.8em;
    color: #474747;
    cursor: url(../img/cursors/cursor_pointer.svg), pointer;
    white-space: nowrap;
    user-select: none;
}
.crm_tab:hover { color: #999999; }
.crm_tab.on {
    background-color: #d2d2d208;
    color: #d2d2d2;
    box-shadow: inset 3px 0 0 #d2d2d2;
}

.crm_list { flex: 1; overflow-y: auto; min-height: 0; padding: 2px 0 20px; }

.crm_row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: url(../img/cursors/cursor_pointer.svg), pointer;
    min-width: 0;
}
.crm_row:hover { background-color: #d2d2d20a; }
.crm_row:hover .crm_nm { color: #ffffff; }
.crm_row img { width: 26px; height: 26px; flex-shrink: 0; }
.crm_row.pl img { border-radius: 50%; }
.crm_nm {
    color: #d2d2d2;
    font-size: 0.9286em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.crm_sub {
    margin-left: auto;
    font-size: 0.7143em;
    color: #474747;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.crm_pairrow { display: flex; align-items: center; padding: 0 6px; }
.crm_pairrow .crm_row { flex: 1; padding: 8px 8px; }
.crm_pairrow .crm_arr { color: #474747; font-size: 0.8em; }

.crm_tiertag {
    font-size: 0.6429em;
    letter-spacing: 1px;
    color: #151515;
    background-color: #d2d2d263;
    padding: 1px 6px;
    font-family: 'Shentox SemiBold', 'Segoe UI', sans-serif;
    flex-shrink: 0;
}
.crm_srtype {
    font-size: 0.7143em;
    letter-spacing: 1px;
    color: #474747;
    text-transform: uppercase;
    padding: 14px 14px 4px;
}
.crm_body { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: 16px; }
.crm_statrow { display: flex; gap: 8px 18px; padding: 12px 14px 2px; flex-wrap: wrap; }
.crm_stat { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.crm_statv { font-size: 1.3em; color: #d2d2d2; font-variant-numeric: tabular-nums; }
.crm_statl { font-size: 0.6429em; color: #474747; letter-spacing: 1px; text-transform: uppercase; }
.crm_tree { border-left: 1px solid #313131; margin-left: 27px; }
.crm_crumbs { display: flex; gap: 6px; padding: 8px 14px 0; overflow-x: auto; flex-shrink: 0; }
.crm_chip {
    flex-shrink: 0;
    padding: 3px 9px;
    background-color: #00000042;
    border: 1px solid #313131;
    color: #999999;
    font-size: 0.7143em;
    cursor: url(../img/cursors/cursor_pointer.svg), pointer;
    white-space: nowrap;
}
.crm_chip:hover { color: #d2d2d2; }
.crm_screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.crm_screen.on { display: flex; }

@media only screen and (max-width: 700px) {
    #content-CR { overflow: hidden; }
    #content-CR > svg,
    #content-CR .mat_colWrapper,
    #CRInfos { display: none; }
    #crMobile {
        display: block;
        position: absolute;
        inset: 0;
    }
}

/********************************/

/* ---- CR mobile: orbit walker view (toggled from the detail page) ---- */
.crm_orbit { position: relative; width: 100%; height: 100%; overflow: hidden; }
.crm_orbit svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.crm_onode {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 86px;
    cursor: url(../../img/cursors/cursor_pointer.svg), pointer;
}
.crm_onode img {
    width: 34px;
    height: 34px;
    background-color: #00000042;
    border: 1px solid #313131;
    padding: 4px;
    box-sizing: content-box;
}
.crm_onode:hover img { border-color: #d2d2d2a0; }
.crm_onode.pl img { border-radius: 50%; }
.crm_onm {
    font-size: 0.7143em;
    color: #999999;
    text-align: center;
    line-height: 1.25;
    max-width: 86px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.crm_onode.center { width: 120px; cursor: default; }
.crm_onode.center img {
    width: 52px;
    height: 52px;
    border-color: #d2d2d2a0;
    box-shadow: inset 3px 0 0 #d2d2d2;
}
.crm_onode.center .crm_onm { color: #d2d2d2; font-size: 0.8571em; }
.crm_olbl {
    position: absolute;
    left: 14px;
    font-size: 0.6429em;
    letter-spacing: 2px;
    color: #474747;
    text-transform: uppercase;
    user-select: none;
}

/* ---- SC board design: the walk colours the whole plate. The script
   still tags .vignette-body-infos with the degree class (mechanics
   untouched); :has() lifts the colour onto the plate, the strip stays
   dark so quantities and prices keep their contrast. ---- */
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_0) .vignette-mat { background-color: var(--degree0) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_1) .vignette-mat { background-color: var(--degree1) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_2) .vignette-mat { background-color: var(--degree2) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_3) .vignette-mat { background-color: var(--degree3) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_4) .vignette-mat { background-color: var(--degree4) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_5) .vignette-mat { background-color: var(--degree5) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_6) .vignette-mat { background-color: var(--degree6) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_7) .vignette-mat { background-color: var(--degree7) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_8) .vignette-mat { background-color: var(--degree8) !important; }
#content-CR .vignette:has(.vignette-body-infos.backgroundColor_00) .vignette-mat { background-color: #d2d2d2 !important; }
#content-CR .vignette-body-infos[class*="backgroundColor_"] { background-color: #212121 !important; color: #999999 !important; }
