@charset "UTF-8";
.modal-content {
  border-radius: 10px;
}

.modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.form-container {
  width: 100%;
  max-width: 400px;
}

.nav-tabs {
  justify-content: center;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-actions {
  margin-left: auto;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #dee2e6;
}

.accordion-button:not(.collapsed),
.accordion-button,
.accordion-item:first-of-type > .accordion-header .accordion-button {
  background: none;
  outline: none;
  border: none;
  box-shadow: none;
}

/* Стили для панели истории */
#historyPanel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: #f8f9fa;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
  z-index: 1050;
  transition: right 0.3s ease-in-out;
  overflow-y: auto;
}

#historyPanel.open {
  right: 0;
}

#historyPanel .history-header {
  background: #007bff;
  color: #fff;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#historyPanel .history-header h5 {
  margin: 0;
}

#historyPanel .history-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
}

.log-entry {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}

.log-entry:hover {
  background-color: #f8f9fa;
}

.log-entry .card-body {
  padding: 0.25rem;
  display: flex;
  flex-wrap: wrap;
}

.log-entry .card-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  flex: 0 0 50%;
  line-height: 1;
}

.log-entry .card-subtitle,
.log-entry .card-text {
  font-size: 0.7rem;
  margin-bottom: 0.15rem;
  color: #6c757d;
}

.log-entry .card-subtitle {
  flex: 0 0 50%;
}

.log-entry .card-text {
  flex: 0 0 50%;
}

.log-entry .card-text:last-child {
  margin-bottom: 0;
}

.accordion-item {
  position: relative;
}

.queue-position {
  position: absolute;
  top: 3px;
  left: 18px;
  font-size: 11px;
}

.modal-content {
  border-radius: 10px;
}

.modal-body > form {
  width: 100%;
}

/* Секция комментариев */
.comments-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1.5rem;
}

.comments-section h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #495057;
}

.comments-list {
    margin-bottom: 1rem;
}

.comment {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.comment .author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment .author-info strong {
    color: #0d6efd;
    font-size: 0.85rem;
}

.comment .timestamp {
    color: #6c757d;
    font-size: 0.8rem;
}

.comment-text {
    color: #212529;
    line-height: 1.4;
    white-space: pre-wrap;
}

.comment-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

.comment:hover .comment-actions {
    opacity: 1;
}

.comment-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.comment-actions button i {
    font-size: 0.875rem;
}

/* Форма добавления комментария */
.add-comment {
    margin-top: 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
}

.add-comment .input-group {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.add-comment textarea {
    border: none;
    resize: vertical;
    min-height: 38px;
    padding: 0.5rem;
    font-size: 0.95rem;
}

.add-comment textarea:focus {
    box-shadow: none;
}

.add-comment .add-comment-btn {
    border: none;
    background-color: #0d6efd;
    color: white;
    padding: 0.5rem 1rem;
}

.add-comment .add-comment-btn:hover {
    background-color: #0b5ed7;
}

/* Стили для режима редактирования */
.comment.editing .input-group {
    display: flex;
    align-items: stretch;
}

.comment.editing textarea {
    flex-grow: 1;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem;
    min-height: 38px;
    font-size: 0.9rem;
}

.comment.editing .btn-group {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.comment.editing .btn {
    height: 38px;
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
}

/* Компактные стили для истории статусов */
.list-group.mt-3 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.list-group.mt-3 .list-group-item {
    flex: 0 1 auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0;
    border-radius: 4px !important;
    min-width: auto;
    width: auto;
    border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color);
}

.list-group.mt-3 .list-group-item strong {
    margin-right: 0.25rem;
}

.list-group.mt-3 .list-group-item .text-muted {
    font-size: 0.75rem;
}

.tasks-container {
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
 
}

.user-section {
    transition: all 0.3s ease-in-out;
    order: 0;
}

.user-section.hidden {
    order: 1;
}

.tasks-section {
    transition: all 0.3s ease-in-out;
    opacity: 1;
    max-height: 10000px;
    overflow: hidden;
}

.tasks-section[style*="display: none"] {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.toggle-container {
    margin-bottom: 1rem;
}

.toggle-tasks {
    transition: all 0.2s ease-in-out;
    min-width: 200px;
}

.toggle-tasks i {
    margin-right: 8px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.btn-slack {
    background-color: #4A154B;
    color: white;
    border: none;
    animation: pulse 2s infinite;
}

.btn-slack:hover {
    background-color: #5c1b5d;
    color: white;
}
.extra-info {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid gray;
  border-radius: 4px;
  width: 320px;
  display: none;
  font-size: 14px;
  padding: 10px;
}
.parent-extra-info {
  white-space: nowrap;
}
.parent-extra-info:hover .extra-info {
  display: block;
}




/* ====================================================== */
/* МЕДИАЗАПРОСЫ (MEDIA QUERIES) ДЛЯ АДАПТИВНОСТИ */
/* ====================================================== */

/* Для маленьких экранов (мобильные, до 576px) */
@media (max-width: 575.98px) {
  body {
      padding: 10px; /* Уменьшаем padding на маленьких экранах */
  }

  h1 {
      /* font-size: 1.8rem;  */
      font-size: 1.45rem;
      text-align: center;
  }

  /* Модальное окно занимает почти всю ширину */
  .modal-dialog {
      width: 95%;
   
      margin: 10px; /* Добавим небольшой отступ */
  }

  /* Панель истории по умолчанию займет всю ширину на маленьких экранах */
  #historyPanel {
      max-width: 100%; /* Убедимся, что на совсем маленьких экранах она 100% */
  }

  /* Элементы заголовка аккордеона могут переноситься */
  .accordion-header {
      flex-wrap: wrap;
      padding: 10px; /* Отступ */
  }
  .accordion-button {
      flex-basis: 100%; /* Кнопка занимает всю ширину */
      margin-bottom: 5px; /* Отступ от действий */
      /* font-size: 1rem; */
      font-size: 0.72rem;
      padding: 10px 0 0 0;
     margin: 0;
      flex-direction: column;
      gap: 5px;
  }
  .queue-position {
      top: 5px; /* Позиционирование будет чуть другим */
      left: 5px;
  }
  .task-actions {
      border-left: none; /* Убираем вертикальную границу */
      border-top: 1px solid #dee2e6; /* Добавляем горизонтальную */
      margin-left: 0;
      width: 100%; /* Занимает всю ширину */
      justify-content: center;
      padding-top: 10px;
  }

  /* Комментарии: действия переносятся вниз */
  .comment .comment-header {
      flex-direction: column;
      align-items: flex-start; /* Выравниваем по левому краю */
      gap: 5px;
  }
  .comment .timestamp {
      width: 100%; /* Время под автором */
      text-align: right;
  }
  .comment-actions {
      justify-content: flex-start; /* Выравниваем кнопки действий по левому краю */
      flex-direction: column; /* Кнопки одна под другой */
      gap: 8px; /* Увеличиваем отступ */
  }
  .comment-actions button {
      width: 100%; /* Кнопки занимают всю ширину */
  }

  /* Редактирование комментария: textarea и кнопки в колонку */
  .comment.editing .input-group {
      flex-direction: column;
  }
  .comment.editing .btn-group {
      margin-left: 0;
      justify-content: stretch; /* Растягиваем кнопки */
      flex-wrap: nowrap;
  }
  .comment.editing .btn {
      flex-grow: 1; /* Кнопки заполняют доступное место */
  }


  .align-items-center {
    /* flex-direction: column; */
  }
  .text-bg-info,
  .text-bg-warning,
 .text-bg-primary,
.text-bg-secondary  {
position: absolute;
    top: 0;
    right: 0;
  }
  .tasks-container {
 
    position: relative;
}
.bg-success,
.bg-danger,
.bg-warning {
    position: absolute;
    margin-top: -20px;
}
.extra-info {
    left: 50%;
    font-size: 12px;
    width: 220px;
}
.accordion-item {
    margin-bottom: 30px;
}
.accordion-item:not(:first-of-type){
    border-top: 1px solid var(--bs-accordion-border-color);
    border-top-left-radius: var(--bs-accordion-border-radius);
    border-top-right-radius: var(--bs-accordion-border-radius) 0.375rem;

}
.accordion-body {
    font-size: 14px;
}
.form-control {
    font-size: 0.7rem;
}
.input-group textarea {
    font-size: 0.7rem;
}
}

/* Для средних экранов (планшеты, от 576px до 992px) */
@media (min-width: 576px) and (max-width: 991.98px) {
  body {
      padding: 20px;
  }
  .modal-dialog {
      width: 80%;
  }
  #historyPanel {
      max-width: 400px; /* Немного уменьшаем для планшетов */
  }

  /* Аккордеон: кнопки действий могут быть в ряд */
  .task-actions {
      /* flex-wrap: nowrap;  */
  }

  /* Комментарии: действия могут быть в один ряд, если позволяет место */
  .comment .comment-header {
      flex-wrap: wrap; /* Все еще может переноситься */
      gap: 15px;
  }
  .comment .timestamp {
      flex-basis: auto; /* Возвращаем автоматическую ширину */
      text-align: right;
  }
  .comment-actions {
      flex-wrap: nowrap; /* Стараемся держать в один ряд */
      justify-content: flex-end;
  }

  /* Редактирование комментария: кнопки могут быть в ряд */
  .comment.editing .input-group {
      flex-direction: row; /* Возвращаем в строку */
  }
  .comment.editing .btn-group {
      flex-wrap: nowrap;
      margin-left: 0.5rem;
  }

  .badge span {
    position: absolute;
    left: 70%;
    bottom: 96%;
  }
}

/* Для больших экранов (десктопы, от 992px и выше) */
@media (min-width: 992px) {
  body {
      padding: 30px;
  }
  .modal-dialog {
      width: 60%;
  }
  #historyPanel {
      max-width: 440px; /* Стандартная ширина */
  }

  /* Аккордеон: всегда в ряд */
  .task-actions {
      /* flex-wrap: nowrap; */
  }

  /* Комментарии: всегда в ряд */
  .comment .comment-header {
      flex-wrap: nowrap;
  }
  .comment-actions {
      flex-wrap: nowrap;
  }
  .comment.editing .input-group {
      flex-direction: row;
  }
  .comment.editing .btn-group {
      flex-wrap: nowrap;
  }
}