@use "@material/animation/_index" as animation;
@use "@material/rtl/_index" as rtl;
@use "@material/shape/_index" as shape;
@use "@material/typography/_index" as typography;
@use "~/util";

.mdc-drawer.details-drawer {
  justify-content: stretch;
  &.mdc-drawer--dismissible {
    z-index: 2;
  }
  &.mdc-drawer--modal {
    top: 0;
  }
  .mdc-drawer__header {
    display: flex;
    align-items: center;
    @include util.divider-border(bottom);
    .mdc-drawer__title {
      flex: auto 1;
      flex-shrink: 0;
      margin-bottom: 0;
    }
    .close-icon {
      flex-grow: 0;
      flex-shrink: 0;
    }
  }
  .mdc-drawer__content {
    flex-grow: 1;
    flex-shrink: 1;
    height: auto;
    a {
      text-decoration: none;
    }
    .details {
      &-image {
        margin: 16px;
        margin-bottom: 8px;
        padding-top: 56.25%;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
      }
      &-text {
        padding: 0px 16px 16px;
        display: flex;
        flex-direction: column;
        .mdc-typography--overline {
          margin: 0;
        }
        .mdc-typography--headline4,
        .mdc-typography--body2,
        .mdc-typography--caption {
          margin: 8px 0px;
        }
        .mdc-typography--headline4 {
          div {
            display: inline-flex;
            align-items: center;
            .twemoji {
              height: 2.25rem;
              @include rtl.reflexive-box(margin, left, 0.75rem);
            }
          }
        }
      }
      &-button {
        display: flex;
        justify-content: stretch;
        padding: 0 16px 16px;
        .mdc-button {
          flex-grow: 1;
          flex-basis: 50%;
          &:not(:first-child) {
            @include rtl.reflexive-box(margin, left, 16px);
          }
        }
      }
      &-list {
        .subheader {
          margin: 0;
          padding: 0 16px 16px;
        }
        .mdc-list {
          padding: 0;
          &-item {
            padding: 0 16px;
          }
        }
      }
    }
  }
  .editor-buttons {
    padding: 8px 16px;
    @include util.divider-border(top);
    display: flex;
    justify-content: stretch;
    .edit {
      flex-basis: 50%;
      flex-grow: 1;
      @include rtl.reflexive-box(margin, right, 8px);
    }
    .delete {
      flex-basis: 50%;
      flex-grow: 1;
      @include rtl.reflexive-box(margin, left, 8px);
    }
  }
  .search-chips {
    height: 100%;
    flex-grow: 1;
    flex-shrink: 1;
    overflow: hidden;
    position: relative;
    .mdc-chip-set {
      position: relative;
      height: 100%;
      flex-wrap: nowrap;
      overflow-x: auto;
      overflow-y: hidden;
      padding: 4px 12px;
      padding-bottom: 32px;
      box-sizing: content-box;
      scroll-behavior: smooth;
      .mdc-chip {
        flex-shrink: 0;
      }
      .padding-fix {
        width: 12px;
        flex-shrink: 0;
        order: 9999;
      }
    }
    &-container {
      height: 48px;
      flex-shrink: 0;
      @include util.divider-border(top);
      display: flex;
      justify-content: stretch;
    }
  }
}
