#sidebar{
        position: absolute !important;
        top: 3rem;
        left: 0;
        width: 18rem;
        height:calc(100vh - 3rem);
/*        height: auto;*/
/*        min-height: 100vh;*/
        z-index: 1002; /* display over inset map and legend*/
        background-color: #FFFFFF;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: 0px 0px 20px hsl(0, 0%, 0%, 0.3);
        border: lightgrey;
        border-style: none none solid solid;
        border-width: 3px;
        box-sizing:border-box;
        transition: transform 0.3s ease;
}

.sideBarSpeciesSelector{
        position:relative;
        left: 1%;
        padding: 0.8rem;
        width: 88%;
        background-color:var(--accent-color);
        color:white;
        /* font-weight: bold; */
        border:0.25px solid var(--light-beige-color);
        cursor: pointer;
        user-select: none;
        border-radius: 5px;
        margin-bottom: 2.5px;
        transition: background-color ease 0.1s;
}

.sideBarSpeciesSelector:hover {
        text-shadow: 0px 0px 1px white;
        background-color: #2b5232;
}

#sidebarSpeciesSelectTitle{
        padding: 0.25rem 0.5rem;

}

#sidebarContent, #sidebarSpeciesContent{
        height: auto;
        overflow-y: auto;
        margin:0 0.5rem;
}

.sidebarTitle{
        font-size: 1.6rem;
        color: var(--bannerColor);
        font-weight: bold;
        line-height: 1.7rem;
        padding: 5px 0 5px 0;
        /* margin-left:0.5rem; */
}
.sideBarSubtitle{
        font-size: 1.15rem;
        font-weight: 500;
}
.sidebarCopy{
        font-size: 0.9rem;
        font-weight: 400;
        margin-left:0.5rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
}

.downloads{
        margin-bottom: 0rem;
        line-height: 1.5;
}

.downloads >.smallButton {
        font-size: 0.8rem; /* coordinate with .conservation-badge */
}

.sidebarImage{
        display: flex;
        margin: auto;
        max-width:  calc(100% - 1em);
        max-height: 19vh;
}
.autoTruncated{                
         /* display: block; or inline-block 
          text-overflow: ellipsis;
          word-wrap: break-word;
          overflow: hidden;
          max-height:6rem; */
          
          /* seems to display multiline better than text-overflow: ellipsis; */
          display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
            cursor: pointer;
}

.sidebarCopy td,.sidebarCopy tr{
        padding: 0px;
}

.sidebarCopy b{
        font-weight: 600;
}

.sideBarSmallerSubtitle {
        font-size: 1.1rem;
        font-weight: 400;   
        margin-left: 0.7rem;
        line-height: 1.0;     
}

.infraVisualWrapper {
        font-size: 0.9rem;
        margin: 0.5rem 0;
        padding-left: 1rem;
}

.infraBlock {
        border-left: 5px solid;
        margin-left: 1rem;
        padding-left: 0.5rem;
        margin-bottom: 0.1rem;
        position: relative;
}

.infraBlock.fenceSidebar {
        border-color: var(--fence-color);
        padding-top: 1rem;
}

.infraBlock.road {
        border-color: #949494;
}

/* Base styling for both rail types */
.infraBlock.railroad,
.infraBlock.plannedRailroad {
  position: relative;
  border-left: 3.5px solid;
  padding-left: 1rem;
  margin-top: 0.5rem;
}

/* Rail colors */
.infraBlock.railroad {
  border-color: var(--existing-rail-color);
}
.infraBlock.railroad::before {
  color: var(--existing-rail-color);
}

.infraBlock.plannedRailroad {
  border-color: var(--planned-rail-color);
  margin-left: 1rem;
  padding-top: 10px;
}
.infraBlock.plannedRailroad::before {
  color: var(--planned-rail-color);
}

/* Shared crosshatch styling (pixel-perfect) */
.infraBlock.railroad::before,
.infraBlock.plannedRailroad::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 0;
  bottom: 0;
  width: 14px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 6px,
    currentColor 6px,
    currentColor 8px

  );
}


.infraLabel {
        font-weight: 100;
        margin-right: 0.3rem;
}

.infraTotal {
        font-weight: 400;
        margin-top: 0.5rem;
        margin-left: 0.5rem;
}

#sidebarSpeciesContent a:link {
        color: white;
}

#sidebarSpeciesContent a:visited {
        color: white;
}

#sidebarSpeciesContent a:hover {
        color: white;
}

.conservation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.1rem;
    min-width: 0.8rem;
    padding:1.5px 4px;
    font-size: 0.8rem;
    border-radius:4px;
    flex-shrink: 0;
}

.conservationLine {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
    margin-top: 0.2rem;
    flex-direction: row;
    cursor: help;
    align-items: center;
    width: fit-content;
}

.conservationText {
    font-size: 0.95rem;
    line-height: 1.1rem;
    flex: 1;
    padding-top: 0.1rem;
    width: fit-content;
    transition: text-shadow 0.1s ease;
}

.conservationText:hover {
    text-shadow: rgb(153, 153, 153) 0 0 1px;
}

.conservationInfo{
        font-size: 0.9rem; 
        margin-left: 0.2rem;
}

#clearSidebarButton{
    border: 0;
    padding: 0.8rem 2rem 0.8rem 2rem;
    text-wrap: nowrap;
    margin: 8px 5px;
}

#sidebarToggle {
    position: absolute;
    top: 30vh;
    left: 17.8rem; /* match sidebar width */
    width: 1.5rem;
    height: 2rem;
    background-color: var(--lighter-accent-color);
    color: white;
    border: 2px solid white;
    border-radius: 4px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0px 0px 8px rgba(0,0,0,0.6);
    transition: left 0.3s ease, transform 0.3s ease, background-color 0.1s ease;
}

#sidebar.hidden {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

#sidebarToggle.hidden {
    left: 0.5rem;
}

#sidebarToggle:hover {
        background-color: var(--darker-grey-color);
}