.mail-details {
  display: grid;
  grid-template-columns: 360px calc(100% - 360px);
}

.inbox-sidebar {
  width: 360px;
  border-right: 1px solid $color-border;
  // padding: 20px;
  // box-shadow: 2px 0px 6px 2px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 60px;
  @include until-widescreen {
    width: 360px;
  }
  .head {
    position: sticky;
    top: 0px;
    z-index: 99;
    background-color: #fff;
    padding: 20px;
    border-bottom: 1px solid $color-border;
    // box-shadow: $ac-shadow-1;
  }
}
.message-list {
  height: calc(100vh - 170px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-inline: 20px;
}

.single-message {
  transition: 0.2s ease-in-out;
  padding: 10px 20px;
  // border-radius: 4px;
  position: relative;
  z-index: 9;
  width: calc(100% + 40px);
  margin-left: -20px;
  border-bottom: 1px solid $color-border;

  &.is-read {
    h6 {
      font-weight: 400 !important;
    }
    h6,
    p,
    button,
    span {
      color: $slate-40;
    }
  }
  &.is-active {
    background-color: $primary-light-gray;

    h6 {
      color: $ac-primary;
    }
  }
  &:hover {
    background-color: hsla(var(--secondary-hue), 12%, 95%);
  }
  p,
  span {
    color: $color-text;
  }
  .time {
    font-size: 11px;
    text-transform: capitalize;
  }
  .ac-checkbox {
    margin-top: 4px;
  }
}

.message-details {
  max-width: 768px;
  margin: 0;
  max-height: calc(100vh - 66px);
  overflow-y: auto;
  .table.ac-table {
    background-color: #fff;
  }
  @include until-widescreen {
    margin: 0;
  }
}

.recommended-actions {
  border-radius: 8px;
  box-shadow: 0px 1px 10px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid $color-border;
  overflow: hidden;
  .recommended-heading {
    padding: 10px 20px;
    border-bottom: 1px solid $color-border;
    background-color: $secondary-light-gray;
  }
  .recommended-body {
    padding: 12px 8px;
    .single-action {
      background-color: hsla(var(--secondary-hue), 12%, 98%);
      border: 1px solid $color-border;
      padding: 16px 20px;
      border-radius: 4px;
    }
  }
}
.message-content {
  // height: calc(100vh - 170px);
  overflow-y: auto;
  overflow-x: hidden;
  // padding-inline: 20px;
}

.is-fullwidth.searchbar {
  .ac-search {
    width: 100%;
    height: 36px;
    &:focus {
      width: 100% !important;
    }
  }
}

body:not(.message-details) .inbox-sidebar {
  width: 100%;
  border-right: none;
}

body:has(.message-details) {
  .inbox-sidebar {
    width: 360px;
    border-right: 1px solid #e2e8f0;
  }
  .ac-system-content {
    max-height: calc(100vh - 60px);
    // overflow: hidden;
  }
}

.message-details {
  max-width: 100%;
  transition: 0.2s ease-in-out;
  &.is-open {
    // background-color: $primary-light-gray;
    padding: 16px;
    background-color: #f1f1f1;
    border-radius: 8px;
    margin: 8px;
  }
  pre {
    max-width: 100%;
    font-size: 1rem;
    max-height: 300px;
    padding: 4px;
    border-radius: 4px;
  }
}

.inbox-toggle {
  width: 32px;
  height: 32px;
  background-color: #fff;
  // box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  border: 1px solid $color-border;
  display: flex;
  align-items: center;
  position: absolute;
  display: none;
  left: -18px;
  cursor: pointer;
  top: 24px;
  z-index: 99999;
  transition: 0.3s ease-in-out;
  &:hover {
    box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.25);
    border-color: $color-border-dark;
  }
}

// transition css
/* we will explain what these classes do next! */
.v-enter-active,
.v-leave-active {
  transition: opacity 0.5s ease;
}

.v-enter-from,
.v-leave-to {
  opacity: 0;
}
