
:host {
  --split-percentage: 50;
  position: relative;
  overflow: hidden;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  height: 100%;
  width: 100%;
}

:host(.visible) #pragma-split-view-right {
  transform: none;
}

:host(.left-spaced) #resize-handle {
  display: block;
}

:host(.flex-right) ::slotted([slot=right]) {
  display: flex;
  flex-direction: column;
}

:host(.left-spaced) #pragma-split-view-left {
  margin-right: var(--split-percentage);
}

::slotted([slot=left]), ::slotted([slot=right]) {
  display: flex;
  flex-direction: column;
  height: 100%;
}

:host([disable-resize]) #resize-handle {
  display: none;
}

:host([disable-resize]) #resize-handle-left {
  display: none;
}

#pragma-split-view-left {
  background: var(--c-surface-bg);
  flex: 1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
}
#pragma-split-view-left #resize-handle-left {
  display: none;
}

#pragma-split-view-right {
  background: var(--c-surface-bg);
  position: absolute;
  height: 100%;
  width: var(--split-percentage);
  right: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
  will-change: transform;
  transform: translateX(102%);
  transition: transform 0.2s ease-in;
  border-left: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
}

#resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1rem;
  display: none;
  right: calc(var(--split-percentage) - 0.5rem);
  z-index: 99;
}
#resize-handle:after {
  display: block;
  content: "";
  border-right: 1px solid var(--c-border);
  width: 0.5rem;
  height: 100%;
}
#resize-handle svg {
  display: none;
  height: 1.5rem;
  width: 1rem;
  padding-left: 0.6rem;
  fill: var(--c-border);
}
#resize-handle:hover {
  cursor: col-resize;
}

#resize-handle.resize-clone {
  left: -0.5rem;
  width: 1rem;
}
#resize-handle.resize-clone:after {
  background: var(--c-border);
}

.animation-layer-parent-bound {
  background: var(--c-surface-bg);
  opacity: 0.7;
}

@media screen and (max-width: 812px) {
  #pragma-split-view-right {
    width: 100%;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
  }

  #pragma-split-view-left {
    display: flex;
    flex-direction: column;
  }

  #pragma-split-view-left:after {
    transition: all 0.2s ease-in;
    transition-property: opacity;
    will-change: opacity;
    opacity: 0;
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    background: var(--c-group-bar);
  }

  :host(.visible) #pragma-split-view-left {
    pointer-events: none;
  }
  :host(.visible) #pragma-split-view-left:after {
    opacity: 1;
  }

  :host(.left-spaced) ::slotted([slot=left]) {
    padding-right: 0;
  }
  :host(.left-spaced) #pragma-split-view-left {
    margin-right: 0;
  }
}
