:global(.bp3-tag) {
  background-color: var(--seashell);
  color: var(--reef);
  text-transform: uppercase;
  font-size: 10px;

  &:global(.bp3-intent-primary) {
    background-color: var(--hover-ocean);
    color: var(--ocean);
  }
  &:global(.bp3-intent-warning) {
    background-color: var(--hover-lighthouse-30);
    color: var(--lighthouse);
  }
}

.w100 {
  width: 100%;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fff;

  .mainNav {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-large);
  }

  .mainContent {
    display: flex;
    flex: 1 1 auto;
    height: calc(100% - 50px);

    .column {
      padding-left: var(--spacing-large);
      padding-right: var(--spacing-large);
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .emptyContainer {
      flex: 1;
    }

    .sidebar {
      width: 25%;
      background-color: var(--bg);
    }

    .conversationContainer {
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      height: 100%;
    }

    .sidebarContainer {
      width: 25%;
      padding-left: var(--spacing-x-large);
      border-left: 1px solid var(--seashell);
      overflow-y: auto;

      .createdDate {
        font-size: 10px;
      }

      .table {
        margin-top: var(--spacing-medium);
        width: 100%;

        th {
          color: var(--shark);
          font-size: 12px;
          font-weight: 500;
          line-height: 1.08;
          padding-bottom: var(--spacing-small);
        }

        td {
          font-size: 10px;
          line-height: 1.5;
          color: var(--shark);
        }
      }

      .commentForm {
        display: flex;
        margin-top: auto;
        margin-bottom: var(--spacing-x-large);

        textarea {
          background: var(--white);
          border-radius: 15px;
          border: solid 1px var(--seashell);
          color: var(--shark);
          font-family: inherit;
          font-size: 12px;
          height: 40px;
          line-height: 1.25;
          padding: 12px 10px 10px;
          resize: none;
          transition: border 0.3s;
          width: 100%;

          &:focus {
            border-color: var(--ocean);
          }
        }

        button {
          background: none;
          border: none;
          box-shadow: none;
          cursor: pointer;
          font-size: 14px;
          font-weight: 500;
          min-width: 40px;
          padding: 0;
        }

        button path {
          fill: var(--shark);
        }

        button:hover path {
          fill: var(--ocean);
        }
      }
    }
  }

  .handoffItem {
    width: 100%;
    display: flex;
    margin: 5px 0;
    padding: var(--spacing-x-large) var(--spacing-large) var(--spacing-large);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    align-items: center;

    &:hover {
      background-color: var(--seashell);
    }

    &.active {
      background-color: var(--hover-ocean);
    }

    .info {
      width: 75%;
      color: var(--shark);
      font-size: 12px;
      line-height: 1.5;

      p {
        margin: 0;
      }
    }

    .unreadDot {
      background: var(--ocean);
      border-radius: 50%;
      display: block;
      height: 10px;
      margin-right: var(--spacing-large);
      width: 10px;
    }
  }
  .handoffItemUrgent {
    width: 100%;
    display: flex;
    margin: 5px 0;
    padding: var(--spacing-x-large) var(--spacing-large) var(--spacing-large);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    align-items: center;
    background-color: rgb(255, 229, 180);

    &:hover {
      background-color: rgb(219, 197, 155);
    }

    &.active {
      background-color: rgb(255, 229, 180);
    }
    .info {
      width: 75%;
      color: var(--shark);
      font-size: 12px;
      line-height: 1.5;

      p {
        margin: 0;
      }
    }

    .badge {
      margin-left: auto;
    }

    .unreadDot {
      background: var(--ocean);
      border-radius: 50%;
      display: block;
      height: 10px;
      margin-right: var(--spacing-large);
      width: 10px;
    }
  }
  .agentList {
    padding: 0;
    margin: 0;
    list-style-type: 'none';

    .agentItem {
      height: 30px;
      width: 30px;
      border-radius: 50%;
    }

    .agentListItem {
      display: inline;
      margin-right: 8px;
    }
  }

  .dot {
    top: -3px;
    right: -3px;
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: transparent;
    border-radius: 5px;
  }

  .createdDate {
    color: var(--reef) !important;
    font-size: 12px;
    line-height: 1.5;
  }

  .clientName {
    background: none;
    border: none;
    color: var(--ocean);
    font-size: 14px;
    line-height: 1.29;
    margin: 0;
    padding: 0;
  }

  .profileHeader {
    margin: var(--spacing-xx-large) 0 var(--spacing-large) 0;
    font-size: 12px;
    line-height: 1.25;
    color: var(--shark);

    p {
      margin: 0;
    }
  }

  .hitlToolBar {
    margin-bottom: var(--spacing-xx-large);

    .coversationButton {
      &:global(.bp3-button):not(:global(.bp3-disabled)):hover {
        background-color: transparent !important;
        color: var(--ocean);
        svg {
          fill: var(--ocean) !important;
          transition: none;
        }
      }
    }
  }

  .agentBtnWrapper {
    position: relative;

    .agentBtn {
      color: var(--shark);
      font-size: 12px;
      line-height: 1.25;

      .agentBtnText {
        margin-left: var(--spacing-medium);
        margin-right: var(--spacing-small);
      }

      svg {
        fill: var(--shark) !important;
      }
    }

    :global(.more-options-more-menu) {
      right: -8px;
      top: 70%;
    }
  }

  .divider {
    background: var(--gray);
    height: 1px;
    margin: var(--spacing-xx-large) 0 var(--spacing-x-large);
    width: 100%;
  }

  .liveConversation {
    flex-grow: 1;
    .webchatWrapper {
      height: 100%;
      display: flex;
      flex-direction: column;
      > div {
        height: 100%;
      }
      .webchatIframe {
        position: relative;
        width: 100%;
        z-index: 10;
      }
    }
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  height: 100%;

  .handoffList {
    background-color: var(--bg);
    overflow-y: scroll;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    width: 100%;
  }
}
.messageList {
  flex-grow: 1;
  overflow-y: auto;

  .messageContainer {
    display: flex;
    width: 100%;
    .message {
      max-width: 300px;
      border: solid 1px var(--bg);
      font-size: 12px;
      line-height: 1.25;
      border-radius: 15px;
      color: var(--shark);
      padding: var(--spacing-medium);
      display: flex;
      align-items: center;
      margin-bottom: 10px;
    }

    &.user {
      justify-content: flex-start;
      .message {
        border-bottom-left-radius: 0;
      }
    }
    &.bot {
      justify-content: flex-end;
      .message {
        border-bottom-right-radius: 0;
        background-color: var(--bg);
      }
    }
  }

  .bpwChatBubble {
    margin-bottom: var(--spacing-medium);
    white-space: pre-wrap;
    word-break: break-word;

    p {
      margin: 0;
    }
  }

  .bpwChatBubble:first-of-type {
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
  }

  .bpwChatBubble:last-of-type {
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
  }

  .bpwChatBubbleContent {
    border: solid 1px var(--seashell);
    font-size: 12px;
    line-height: 1.25;
    border-radius: 15px;
    color: var(--shark);
    padding: var(--spacing-medium);
    transition: border 0.3s, background 0.3s, color 0.3s;

    .createdDate {
      color: var(--reef) !important;
      font-size: 10px;
      line-height: 1.25;
    }
  }
}
