/* stylelint-disable alpha-value-notation, color-function-notation, color-hex-length, declaration-empty-line-before, prettier/prettier, rule-empty-line-before, selector-attribute-quotes, selector-class-pattern, value-keyword-case */
:root {
  --es-sidebar-padding: 1rem;
  --es-sidebar-shadow: 0 0 1px 0 rgba(73, 79, 95, 0.6), 0 2px 10px -5px rgba(73, 79, 95, 0.55), 0 3px 30px -15px rgba(73, 79, 95, 0.8), 0 0 50px -5px rgba(73, 79, 95, 0.5);
  --es-sidebar-transition-duration: .3s;
}

.es-sidebar-toggle,
.es-sidebar-close {
  display: none;
}

.es-sidebar--border-right {
  border-right: 2px solid var(--color-gray-300);
}

.es-sidebar {
  background-color: var(--color-gray-200);
}

@media (width <= 844px) {
  .es-sidebar-toggle {
    position: fixed;
    z-index: 1;
    bottom: 30px;
    right: 30px;

    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: 60px;
    padding: 0;

    border-radius: 30px;
    box-shadow: var(--es-sidebar-shadow);
  }

  @keyframes es-sidebar-in {
    0% {
      display: block;
      opacity: 0;
      transform: scale(0.01);
    }
    100% {
      display: block;
      opacity: 1;
      transform: scale(1);
    }
  }

  .es-sidebar {
    box-sizing: border-box;
    display: none;
    position: fixed;
    z-index: 1;
    top: var(--es-sidebar-padding);
    left: var(--es-sidebar-padding);
    height: calc(100% - var(--es-sidebar-padding) * 2);
    width: calc(100vw - var(--es-sidebar-padding) * 2);
    overflow-y: auto;

    padding: 1rem;
    background: #FFF;
    border-radius: var(--radius);
    box-shadow: none;

    transform-origin: bottom right;
    transition: box-shadow var(--es-sidebar-transition-duration);
  }

  .es-sidebar[aria-expanded=true] {
    display: block;
    animation: var(--es-sidebar-transition-duration) es-sidebar-in ease-out forwards;
    box-shadow: var(--es-sidebar-shadow);
  }

  .es-sidebar-content {
    margin-top: var(--spacing-5);
  }

  .es-sidebar-close {
    display: inline-flex;
    float: right;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: var(--spacing-1);
    background: #FFF;
  }

  .es-sidebar-close svg path {
    fill: currentColor;
  }

  .es-sidebar--border-right {
    border-right: none;
  }
}
