.no-scroll {
  overflow: hidden;
}

.hidden {
  display: none;
}

.custommodal {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;

  .dialog {
    position: fixed;
    background: white;
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-content: stretch;
    max-width: 100%;
  }

  .header {
    padding: 0 23px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);

    h3 {
      font-size: 1.5rem;
      line-height: 4rem;
      display: inline-block;
    }

    .search {
      float: right;
      padding-top: 26px;
      max-width: 100%;

      input,
      button {
        display: inline-block;
        height: 26px;
        line-height: 26px;
        margin: 0;
        vertical-align: bottom;
      }

      input {
        border: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
        padding: 0 2px;
        width: 400px;
      }

      button {
        color: #818181;
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.2);
        text-align: center;
        margin: 0 3px;
        cursor: pointer;
        width: 53px;
        font-size: 0.7rem;
        border-radius: 13px;
        padding: 0;

        &:hover {
          background: #cf1c18;
          color: white;
        }

        &:focus {
          outline: none;
        }
      }
    }
  }

  .content {
    padding: 12px 23px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    height: 100%;
  }

  .footer {
    padding: 0 23px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    text-align: right;

    .pagination {
      float: left;
      margin-top: 17px;
    }

    & > button {
      display: inline-block;
      color: #818181;
      background: white;
      height: 33px;
      line-height: 33px;
      border-radius: 33px;
      border: 1px solid rgba(0, 0, 0, 0.2);
      text-align: center;
      margin: 15px 3px;
      cursor: pointer;
      padding: 0 7px;
      min-width: 82px;

      &[type='submit'] {
        background: #cf1c18;
        color: white;

        &:disabled {
          background: #818181;
        }
      }

      &:hover {
        background: #cf1c18;
        color: white;
      }

      &:focus {
        outline: none;
      }
    }
  }

  .background-fade {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 170px);
    grid-gap: 1rem;
    justify-content: space-between;
    width: 100%;
    align-content: start;

    .element {
      width: 170px;
      height: 130px;
    }
  }

  @include media-breakpoint-down(sm) {
    .grid {
      grid-template-columns: 1fr 1fr;
    }

    .dialog {
      left: auto !important;
      width: 100% !important;
    }

    .content {
      padding: 0.5rem;
    }
  }

  .photo-element {
    cursor: pointer;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.2);

    &.selected {
      border: 4px solid #cf1c18;
    }
  }

  .avatar {
    cursor: pointer;
    user-select: none;
    position: relative;

    .name {
      font-weight: 600;
    }

    .avatarimage {
      width: 90px;
      height: 90px;
      background: #e2e2e2;
      border-radius: 50%;
    }

    .inactiveMarker {
      display: none;
      place-items: center;
      position: absolute;
      top: 0;
      left: 30px;
      height: 90px;

      span {
        display: block;
        color: red;
        font-weight: bold;
        background: rgb(250, 241, 199);
        width: 110px;
        padding: 6px 0;
      }
    }

    &.inactive {
      .name,
      .avatarimage {
        opacity: 0.5;
      }

      .inactiveMarker {
        display: flex;
      }
    }

    &.selected img {
      border: 4px solid #cf1c18;
    }
  }
}

@include media-breakpoint-down(sm) {
  .search {
    display: flex;
    margin-bottom: 20px;
  }

  .dialog .footer {
    padding-bottom: 10px;
  }
}
