@import '../../scss/variables';

.backdrop {
  display: flex;
  background-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: opacity 0.2s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 2;
}
.backdrop.show {
  opacity: 1;
  visibility: visible;
}
.drawer-modal {
  user-select: none;
  box-sizing: border-box;
  position: absolute;
  background: #fff;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  flex-direction: column;
  justify-content: space-between;
  display: none;
  z-index: 3;
  max-width: 60%;
  max-height: 80%;
  padding: 1rem;

  .drawer-modal-header {
    padding: 0.5rem;
    border-top-left-radius: $radius;
    border-top-right-radius: $radius;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 1rem;

    .drawer-modal-title {
      font-size: 1.1rem;
      display: inline;
    }
    .btn-close {
      float: right;
      border-radius: $radius;
      font-size: 1em;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      background-color: inherit;
      padding: 0.4em;

      svg {
        opacity: 0.5;
      }
      &:not(:disabled) {
        &:hover {
          svg {
            opacity: 1;
          }
        }
      }
    }
  }
  .drawer-modal-body {
    overflow: auto;
    height: 100%;
    padding: .7rem;

    &::-webkit-scrollbar-track {
      background-color: $light;
    }
    &::-webkit-scrollbar {
      width: 3px;
    }
    &::-webkit-scrollbar-thumb {
      background-color: $light;
      border-radius: $radius;
    }
    .drawer-modal-p {
      padding: 0.5rem;
      margin-bottom: 0.3rem;
    }
    .drawer-modal-body-list {
      &:first-child {
        margin-top: auto;
        margin-bottom: 0.5rem;
      }
      list-style: none;
      margin: 0;
      padding: 0;
      width: 100%;
    }
    .drawer-modal-body-list-item {
      padding: 0.5rem;
      border-bottom: 1px solid #3e3e3e;
      display: flex;
      justify-content: space-between;
      align-items: center;
      label {
        margin-right: 0.8em;
      }
      &:last-of-type {
        border-bottom: none;
      }
    }
  }

  .drawer-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem;
    border-bottom-left-radius: $radius;
    border-bottom-right-radius: $radius;
  }
}
.drawer-modal.show {
  display: flex;
}
