/* PTP_TASK_COMMENTS_V1 */

.ptp-task-comments-button {
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  background: #eef4ff;
  padding: 7px 10px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.ptp-task-comments-button:hover {
  border-color: #93b4fd;
  background: #dfeaff;
}

.ptp-task-comments-backdrop {
  position: fixed;
  z-index: 31000;
  inset: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  background: rgba(15, 23, 42, .58);
  padding: 22px;
}

.ptp-task-comments-backdrop.hidden {
  display: none !important;
}

.ptp-task-comments-modal {
  display: flex;
  width: min(790px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.ptp-task-comments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 21px;
  border-bottom: 1px solid #e6ebf3;
}

.ptp-task-comments-head h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.ptp-task-comments-head p {
  margin: 5px 0 0;
  color: #7c8ba3;
  font-size: 11px;
}

.ptp-task-comments-close {
  border: 0;
  background: transparent;
  color: #60708a;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.ptp-task-comments-body {
  overflow: auto;
}

.ptp-task-compose {
  position: relative;
  padding: 17px 20px;
  border-bottom: 1px solid #e8edf5;
  background: #fbfcff;
}

.ptp-task-compose textarea {
  width: 100%;
  min-height: 100px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background: #fff;
  padding: 12px 13px;
  color: #172033;
  font: inherit;
  outline: none;
}

.ptp-task-compose textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.ptp-task-compose-help {
  margin-top: 7px;
  color: #8391a7;
  font-size: 10px;
}

.ptp-task-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}

.ptp-task-mention-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ptp-task-mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  padding: 5px 8px;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
}

.ptp-task-mention-chip button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

.ptp-task-comment-post {
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  padding: 10px 16px;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.ptp-task-comment-post:disabled {
  cursor: wait;
  opacity: .6;
}

.ptp-task-mention-suggestions {
  position: absolute;
  z-index: 10;
  right: 20px;
  bottom: 69px;
  left: 20px;
  overflow: auto;
  max-height: 220px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, .17);
}

.ptp-task-mention-suggestions.hidden {
  display: none !important;
}

.ptp-task-mention-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.ptp-task-mention-option:hover {
  background: #f4f8ff;
}

.ptp-task-mention-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2563eb;
  font-size: 10px;
  font-weight: 900;
}

.ptp-task-mention-option strong,
.ptp-task-mention-option small {
  display: block;
}

.ptp-task-mention-option small {
  margin-top: 2px;
  color: #8491a6;
  font-size: 9px;
}

.ptp-task-comments-list {
  display: grid;
  gap: 11px;
  padding: 17px 20px 21px;
}

.ptp-task-comment-card {
  border: 1px solid #e1e8f1;
  border-radius: 12px;
  background: #fff;
  padding: 12px 13px;
}

.ptp-task-comment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ptp-task-comment-author {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ptp-task-comment-author strong,
.ptp-task-comment-author small {
  display: block;
}

.ptp-task-comment-author small {
  margin-top: 2px;
  color: #8391a7;
  font-size: 9px;
}

.ptp-task-comment-time {
  color: #8c99ad;
  font-size: 9px;
  white-space: nowrap;
}

.ptp-task-comment-text {
  margin-top: 10px;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.ptp-task-comment-text mark {
  border-radius: 5px;
  background: #eaf2ff;
  padding: 1px 4px;
  color: #1d4ed8;
  font-weight: 800;
}

.ptp-task-comments-empty {
  padding: 30px 20px;
  color: #8190a8;
  text-align: center;
  font-size: 12px;
}

.ptp-live-alert-host {
  position: fixed;
  z-index: 32000;
  top: 82px;
  right: 20px;
  display: grid;
  width: min(370px, calc(100vw - 30px));
  gap: 10px;
  pointer-events: none;
}

.ptp-live-alert {
  border: 1px solid #c8d8fb;
  border-radius: 14px;
  background: #fff;
  padding: 13px 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
  pointer-events: auto;
  animation: ptpAlertIn .22s ease-out;
}

.ptp-live-alert-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ptp-live-alert strong {
  display: block;
  color: #172033;
  font-size: 12px;
}

.ptp-live-alert p {
  margin: 5px 0 0;
  color: #53627a;
  font-size: 11px;
  line-height: 1.45;
}

.ptp-live-alert button {
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  padding: 7px 10px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

@keyframes ptpAlertIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 650px) {
  .ptp-task-comments-backdrop {
    padding: 10px;
  }

  .ptp-task-comments-modal {
    max-height: calc(100vh - 20px);
  }

  .ptp-task-compose-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ptp-task-comment-post {
    width: 100%;
  }

  .ptp-live-alert-host {
    top: 68px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}