.indexbar-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  display: flex;
  display: -webkit-box;
  display: -ms-flexbox;

  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;

  -webkit-box-pack: end !important;
  -ms-flex-pack: end !important;
  justify-content: flex-end !important;

  pointer-events: none;
  overflow:hidden;

  .indexbar {
    position: relative;
    pointer-events: auto;
    z-index: 2;
    width: 2em;
    font-weight: bold;
    touch-action: pan-y; /* allow vertical scroll (list) to work when touch starts on strip; avoids blocking scroll after long press */

    //display: flex;
    flex-direction: column;
    justify-content: center;

    /* Letter rows: fixed height from JS; prevent flex shrink so spacing stays even (avoids vertical gaps). Do not use overflow: hidden here or the visible .letter text gets clipped. */
    div {
      position: relative;
      text-align: center;
      line-height: 5px;
      display: block;
      flex-shrink: 0;
      box-sizing: border-box;
    }

    /* Bubble (SVG) out of flow so it never increases row height and creates gaps between letters; limit size to row. When visible, show it to the left of the letter strip. */
    div .SvgImage {
      position: absolute;
      right: 100%;
      left: auto;
      margin-right: 4px;
      max-height: 100%;
    }
    div img {
      max-height: 100%;
    }

    /* Legacy: position letter in bubble (slightly left and lower than center). */
    div .SvgImage .iconLetter {
      left: 45%;
      top: 58%;
      transform: translate(-50%, -50%);
      margin-left: 0 !important;
      margin-top: 0;
      line-height: 1;
    }

    .letter {
        float: right;
        width: 18px;
        padding-top: 10px;
    }

    .iconLetter {
        position: absolute;
        margin-left: -20px;
        margin-top: 2px;
    }
  }
}

.indexbar-wrapper--lumina {
  background-color: var(--slds-g-color-surface-container-1);

  /* Lumina: position letter in bubble (oval has pointer on right; 42%/80% looks good). */
  .indexbar div .SvgImage .iconLetter {
    left: 42%;
    top: 80%;
    transform: translate(-50%, -50%);
    margin-left: 0 !important;
    margin-top: 0;
    line-height: 1;
  }
}
