/* ========================================
   ATTACHMENT UPLOADER — Загрузка фото/видео
   ======================================== */

.attachment-uploader {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Кнопка "Прикрепить файл" */
.attachment-uploader__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  width: 100%;
  /* удобно на мобильных */
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-sm, 6px);
  color: #a78bfa;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  align-self: flex-start;
  user-select: none;
}

.attachment-uploader__btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
}

.attachment-uploader__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.15);
}

/* Скрытый input */
.attachment-uploader__input {
  display: none;
}

/* Список загруженных файлов */
.attachment-uploader__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Элемент списка */
.attachment-uploader__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 13px;
  color: #b0b0d0;
}

.attachment-uploader__item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.attachment-uploader__item-name i {
  margin-right: 4px;
}

/* Кнопка удаления (крестик) */
.attachment-uploader__item-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  color: #ef4444;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.attachment-uploader__item-remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Прогресс-бар */
.attachment-uploader__progress {
  padding: 0;
}

.attachment-uploader__progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.attachment-uploader__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #667eea, #8b5cf6);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.attachment-uploader__progress-text {
  font-size: 11px;
  color: #7777aa;
}

/* ===== АДАПТИВ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
  .attachment-uploader__btn {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
  }

  .attachment-uploader__item {
    padding: 10px 14px;
  }

  .attachment-uploader__item-remove {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}

@media (max-width: 576px) {

  .attachment-uploader__hint {
    font-size: 0.8rem;
  }
}