div.sidebar-wrapper {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  right: 32px;
  z-index: 10;
}

/* On touch devices, disable link clicks until expanded to prevent parent taps triggering links */
@media (hover: none) {
  .stickyElement:not(.expanded) .options .option > a {
    pointer-events: none;
  }
}
aside.sidebar.fixed {
  pointer-events: auto;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 400;
  background: none;
  border: none;
  @media (max-width: 640px) {
    bottom: 0;
    transform: none;
    top: auto;
  }
  .stickyElement {
    bottom: 0;
    position: absolute;
    right: 100%;
    transform: translateY(50%);
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 5px 5px 15px 5px;
    background-color: #323e50;
    border-color: #323e50;
    border-width: 1px;
    border-style: solid;
    border-radius: 6px;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
    --ssn-shadow: -4px 4px 12px rgba(0, 0, 0, 0.1);
    --ssn-shadow-colored: -4px 4px 12px var(--ssn-shadow-color);
    box-shadow: var(--ssn-ring-offset-shadow, 0 0 #0000),
      var(--ssn-ring-shadow, 0 0 #0000), var(--ssn-shadow);
    @media (max-width: 640px) {
      /* Docked, stable position on small screens to avoid jumps */
      position: fixed;
      bottom: 0;
      right: -2px;
      left: auto;
      transform: none;
      padding: 0;
    }
    .head {
      display: flex;
      position: relative;
      padding-top: 36px;
      color: #fff;
      .image {
        border-radius: 50%;
        overflow: hidden;
        width: 66px;
        height: 66px;
        position: absolute;
        left: -14px;
        top: -18px;
        @media (max-width: 640px) {
          bottom: 20px;
          right: 10px;
          left: auto;
          top: auto;
        }
        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }
      .title {
        font-weight: 700;
        color: #fff;
        font-size: 16px;
        line-height: 120%;
        &.hidden {
          display: none;
        }
        .subtitle {
          font-weight: 400;
          font-size: 14px;
          line-height: 120%;
          color: #fff;
          margin-top: 4px;
        }
      }
    }
    .options {
      display: flex;
      color: #fff;
      &:not(.no-hs) {
        @media (max-width: 640px) {
          display: none;
        }
      }
      flex-direction: column;
      gap: 20px;
      .option {
        align-items: center;
        display: flex;
        gap: 12px;
        &.wysiwyg {
          min-width: 300px;
          display: block;
          padding: 15px;
        }
        &:last-child {
          margin-bottom: 5px;
        }
        > a {
          transition: color 0.3s ease-in-out;
          font-size: 18px;
          line-height: 120%;
          text-decoration: none;
          white-space: nowrap;
          display: flex;
          gap: 30px;
          color: #fff;
          &:hover {
            text-decoration: underline;
            color: #fff;
            /* .icon img {
              filter: drop-shadow(0px 0px 3px var(--mainColor, #000));
            } */
          }
        }
        .icon {
          padding: 0 7px;
          display: flex;
          img {
            width: 24px;
            max-height: 24px;
            object-fit: contain;
          }
        }
        .link {
          &.hidden {
            display: none;
          }
        }
        &.divider {
          hr {
            margin: 5px 0;
            background: rgb(206, 206, 206);
            width: 100%;
          }
        }
        &.hidden {
          display: none;
        }
      }
    }
  }
  &:hover,
  &:focus,
  &:focus-within {
    .stickyElement {
      border-radius: 6px;
      padding: 13px 25px 13px 13px;
      border-top-left-radius: 35px;
      /* Keep position stable on mobile; avoid switching position on hover */
      .title.hidden,
      .options .option.hidden,
      .options .link.hidden {
        display: block;
        &.wysiwyg {
          display: block;
        }
      }
      .options {
        /* margin-top: 30px; */
        @media (max-width: 640px) {
          display: flex;
        }
      }
      .head {
        padding-left: 68px;
        padding-top: 0;
      }
      .head .image {
        left: -15px;
        top: -15px;
      }
    }
  }
}
/* Expanded state (toggled via JS on first tap) */
.stickyElement.expanded .title.hidden,
.stickyElement.expanded .options .option.hidden,
.stickyElement.expanded .options .link.hidden {
  display: block;
}
.stickyElement.expanded .options {
  display: flex;
}
