/* ----------------------------------------- */
/* DFCE Rolltype Buttons                     */
/* ----------------------------------------- */

#chat-controls {
  padding: 0px;
  gap: var(--sidebar-gap);
  align-items: center;
  .buttons {
    gap: var(--sidebar-gap);
    flex-wrap: nowrap;
  }
}

#dorako-rt-buttons {
  flex: 1 0 170px;
}

#dorako-nonrt-buttons {
  flex: 1 1 30px !important; // Chat reactions unsets this

  &:empty {
    display: none;
  }

  > button {
    flex: 1 1 32px;
  }
}

[data-theme] {
  #dorako-rt-buttons {
    button {
      @include dui-button;
      &.active {
        background-color: var(--color-primary-2);
        border: var(--app-border-width) solid;
        border-color: var(--app-border-color);
      }
    }
  }
  #dorako-nonrt-buttons button {
    @include dui-button;
  }
}

/* ----------------------------------------- */
/* DFCE Chat Merge                           */
/* ----------------------------------------- */

// Can't get rid of damage buttons, because sometimes you need to attack twice and then roll damage
// .message.dfce-cm-top {
//   > .message-content .message-buttons {
//     display: none;
//   }
// }

.message.chat-message {
  .message-delete {
    z-index: 1;
  }

  &.dfce-cm-top {
    border-bottom-style: none;
    border-bottom-left-radius: 0px !important;
    border-bottom-right-radius: 0px !important;
    margin-bottom: 0px;
    padding-bottom: 5px;
  }

  &.dfce-cm-middle,
  &.dfce-cm-bottom {
    position: relative;
    margin-top: 0px !important;

    .message-content {
      padding-right: 0px;
    }

    .sender-wrapper,
    .portrait-and-name {
      display: none !important;
    }

    .message-header {
      background: transparent !important;
      box-shadow: none;
      margin: 0px;
      padding: 0px;
    }
    .message-metadata {
      display: none;
    }
  }

  &.dfce-cm-middle {
    border-radius: 0px !important;
    margin-top: 0px;
    margin-bottom: 0px;
    padding-top: 0px;
    padding-bottom: 5px;
  }

  &.dfce-cm-bottom {
    margin-top: 0px;
    padding-top: 0px;
    border-radius: 0px 0px var(--border-radius) var(--border-radius) !important;
  }
}

.dfce-cm-middle,
.dfce-cm-bottom {
  .dorako-header {
    display: none;
  }
  &:hover {
    .dorako-header {
      display: block;
      position: absolute;
      right: 0px;
      top: 3px;
      width: fit-content;
      background: none !important;
      box-shadow: none !important;
      z-index: 1;
      .portrait-and-name {
        display: none !important;
      }
    }
  }
}
