themes/olivero/css/layout/social-bar.pcss.css
/**
 * @file
 * Social Bar Region
 .
 */

@import "../base/media-queries.pcss.css";

.social-bar {
  @media (--nav) {
    flex-shrink: 0;
    width: var(--content-left);
    background-color: var(--color--gray-100);
  }
}

.social-bar__inner {
  position: relative;
  padding-block: var(--sp0-5);
  padding-inline-start: var(--sp);
  padding-inline-end: var(--sp);

  @media (--nav) {
    position: relative;
    width: var(--content-left);
    padding-block: var(--sp5);
    padding-inline-start: 0;
    padding-inline-end: 0;

    &.is-fixed {
      position: fixed;
      inset-block-start: var(--sp6);
      inset-inline-start: 0;
      height: calc(100vh - var(--sp6));
    }
  }
}

.rotate {
  & > * {
    margin-block-end: var(--sp2);

    @media (--nav) {
      display: flex;
      align-items: center;
      margin-block-end: 0;

      &:not(:first-child) {
        margin-inline-end: var(--sp2);
      }
    }
  }

  & .contextual {
    @media (--nav) {
      inset-inline: 100% auto;
      transform: rotate(90deg); /* LTR */
      transform-origin: top left; /* LTR */

      & .trigger {
        float: left; /* LTR */

        /**
         * Chromium and Webkit do not yet support flow relative logical properties,
         * such as float: inline-end. However, PostCSS Logical does not compile this
         * value, so we accommodate by not using these.
         *
         * @see https://caniuse.com/mdn-css_properties_clear_flow_relative_values
         * @see https://github.com/csstools/postcss-plugins/issues/632
         */
        &:dir(rtl) {
          float: right;
        }
      }
    }
  }

  @media (--nav) {
    position: absolute;
    inset-inline-start: 50%;
    display: flex;
    flex-direction: row-reverse;
    width: 100vh;
    transform: rotate(-90deg) translateX(-100%); /* LTR */
    transform-origin: left; /* LTR */

    @supports (width: max-content) {
      width: max-content;
    }
  }
}

[dir="rtl"] {
  @media (--nav) {
    & .rotate {
      transform: rotate(90deg) translateX(100%);
      transform-origin: right;

      & .contextual {
        transform: rotate(-90deg);
        transform-origin: top right;
      }
    }
  }
}
