.pep-sidebar{
  --pep-accent: #17489c;
  --pep-accent-light: #e3effd;
  --pep-border: #ececec;
  --pep-text: #333;
  --pep-muted: #9a9a9a;

  position: sticky;
  top: 130px;
  max-height: 100%;
  background: #fff;
  border: 1px solid var(--pep-border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  padding: 18px 16px 16px;
  box-sizing: border-box;
  font-size: 14px;
  color: var(--pep-text);
}

.pep-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.pep-heading{
  font-weight: 700;
  font-size: 16px;
  color: var(--pep-accent);
  text-transform: capitalize;
}
.pep-back{
  font-size: 12px;
  color: var(--pep-muted);
  text-decoration: none;
  white-space: nowrap;
}
.pep-back:hover{ color: var(--pep-accent); }

.pep-toggle{
  display: none; /* shown only on mobile, see media query below */
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.pep-chevron{
  display: inline-block;
  color: var(--pep-accent);
  font-size: 14px;
  transition: transform .2s ease;
}
.pep-sidebar.pep-open .pep-chevron{
  transform: rotate(180deg);
}
.pep-sr-only{
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.pep-sidebar input{
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--pep-border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease;
}
.pep-sidebar input:focus{
  border-color: var(--pep-accent);
}

.pep-body{
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.pep-list{
  flex: 1;
  min-width: 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 6px;
}
.pep-list::-webkit-scrollbar{ width: 5px; }
.pep-list::-webkit-scrollbar-thumb{ background: #6d98e2; border-radius: 3px; }
.pep-list::-webkit-scrollbar-track{ background: transparent; }

.pep-empty{
  color: var(--pep-muted);
  font-size: 13px;
}

.pep-letter{
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  margin: 12px 0 4px;
  padding: 3px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--pep-accent);
  text-transform: uppercase;
  border-bottom: 1px solid var(--pep-border);
}
.pep-letter:first-child{ margin-top: 0; }

.pep-sidebar ul{
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
}
.pep-sidebar li{
  margin: 1px 0;
}
.pep-sidebar li.pep-hidden{
  display: none;
}

.pep-link{
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--pep-text);
  text-decoration: none;
  line-height: 1.3;
  transition: background-color .12s ease, color .12s ease;
}
.pep-link:hover{
  color: var(--pep-accent);
  background: var(--pep-accent-light);
}

/* the little A-Z jump strip on the right edge of the sidebar */
.pep-az-strip{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-left: 4px;
  border-left: 1px solid var(--pep-border);
  flex-shrink: 0;
}
.pep-az-btn{
  background: none;
  border: none;
  cursor: pointer;
  font-size: 9px;
  font-weight: 600;
  color: var(--pep-muted);
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1.5;
}
.pep-az-btn:hover,
.pep-az-btn.pep-az-active{
  color: #fff;
  background: var(--pep-accent);
}

@media (max-width: 768px){
  .pep-sidebar{
    position: static;
    max-height: none;
    padding: 14px 16px;
  }

  .pep-header{
    margin-bottom: 0;
    cursor: pointer;
  }

  .pep-toggle{
    display: inline-flex;
    align-items: center;
  }

  /* collapsed by default on mobile — plain display:none/block,
     deliberately not relying on grid/overflow tricks which some
     theme/Elementor global CSS resets can override */
  .pep-collapsible{
    display: none !important;
    margin-top: 12px;
  }
  .pep-sidebar.pep-open .pep-collapsible{
    display: block !important;
  }

  .pep-list{
    max-height: 55vh;
  }
}
