@use "variables" as *;

// squeeze the stage iframe when panel is open
iframe.enable-squeeze.gjs-frame {
  transition: width $transitionSpeedMedium, height $transitionSpeedMedium, left $transitionSpeedMedium;
}
iframe.enable-squeeze.silex-squeeze-left {
  --project-panel-width: max(150px, 15.7%); /* Why 16? Also sass vars do not work here */
  left: var(--project-panel-width);
  width: calc(100% - var(--project-panel-width));
}
// button bar
.#{$pn-prefix}project-bar-panel {
  width: $projectBarWidth;
  padding: 0;
  .#{$pn-prefix}buttons {
    flex-direction: column;
    min-height: 100vh;
    justify-content: flex-start;
    .project-bar-spacer {
      flex: 1;
    }
    .#{$pn-prefix}btn {
      margin: 5px 0 0;
      padding: 5px;
      &.#{$pn-prefix}active {
        background-color: $lighterPrimaryColor;
        width: $projectBarWidth;
        box-shadow: none;
     }
    }
  }
  .logo {
    background-image: url('../assets/logo-silex-small.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-color: transparent;
  }
}

// panels
.#{$pn-prefix}project-bar-container {
  top: $topBarHeight;
  width: $projectPanelWidth;
  min-width: $projectPanelMinWidth;
  height: calc(100% - $topBarHeight);
  background-color: $lighterPrimaryColor;
  &:not(.gjs-hidden) {
    display: flex; // let the child take the whole height
    flex-direction: column;
  }
  .project-bar__panel:not(.gjs-hidden) {
    flex: 1;
    display: flex; // let the child take the whole height
    flex-direction: column;
    background-color: $primaryColor;
    overflow: auto;
    .gjs-layer {
      background-color: $primaryColor;
    }
  }
  .project-bar__panel > *:not(header) {
    flex: 1;
    display: initial;
   }
   .project-bar__panel-header {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 5px;
      border-bottom: 1px solid $lighterPrimaryColor;
      .project-bar__panel-header-title {
        flex: 1 1 auto;
        overflow-x: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 3px 0;
        margin: 0;
        font-size: large;
        font-weight: 600;
      }
      .project-bar__panel-header-button {
        cursor: pointer;
        font-size: large;
        font-weight: 400;
        span {
          position: relative;
          left: -6px;
          top: 6px;
          font-weight: bolder;
          background-color: #444;
          border-radius: 100%;
          display: inline-block;
          line-height: 13px;
        }
      }
      .project-bar__panel-header-button:hover {
        color: $quaternaryColor;
      }
    }
  }

