@use '@carbon/layout';
@use '../../vars' as *;

$icon-button-size: layout.$spacing-08;
$actionPanelOffset: layout.$spacing-09;

.sideRailHidden {
  display: none;
}

.sideRailVisible {
  display: flex;
}

/* Desktop */
:global(.omrs-breakpoint-gt-tablet) {
  .sideRail {
    width: $actionPanelOffset;
    z-index: 100;
    height: 100%;

    &.overlay {
      position: absolute;
      top: 0;
      inset-inline-end: 0;
      height: 100%;
    }

    .container {
      background: $ui-01;
      width: $actionPanelOffset;
      height: 100%;
      border-inline-start: 1px solid $color-gray-30;
      display: flex;
      align-items: center;
      flex-direction: column;
    }

    &.withinWorkspace .container {
      top: calc(var(--omrs-navbar-height) + var(--workspace-header-height));
    }
  }
}

/* Tablet */
:global(.omrs-breakpoint-lt-desktop) {
  .sideRail {
    border-top: 1px solid $color-gray-30;
    background-color: $ui-02;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 8003;
    width: 100%;
    display: flex;
    justify-content: stretch;
  }

  .chartExtensions {
    background-color: $ui-02;
    display: flex;
    width: 100%;

    > div {
      flex: 1;
      cursor: pointer;
    }
  }

  .container {
    display: flex;
    align-items: center;
    width: 100%;
    flex: 1;

    > div {
      flex: 1;
    }
  }
}

.divider {
  background-color: $text-03;
  margin: layout.$spacing-04 0;
  height: 1px;
  width: layout.$spacing-08;
}
