/* ============================================================================
 * File: www/css/upload_attachments.css
 * Style dla komponentu uploadu załączników
 * ============================================================================ */

.upload-container {
  margin: 15px 0;
  padding: 15px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.upload-container.upload-drag-over {
  border-color: #0482ff;
  background: rgba(4, 130, 255, 0.1);
}

.upload-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #0482ff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.upload-btn:hover {
  background: #0365cc;
}

.upload-hint {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.upload-preview {
  margin-top: 15px;
}

.upload-empty {
  padding: 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.upload-loader {
  padding: 20px;
  text-align: center;
  color: #0482ff;
  font-weight: bold;
}

.upload-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.upload-file-item {
  position: relative;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  text-align: center;
}

.upload-thumbnail {
  max-width: 100%;
  max-height: 120px;
  border-radius: 4px;
  display: block;
  margin: 0 auto 8px;
}

.upload-file-name {
  font-size: 12px;
  color: #fff;
  margin-bottom: 4px;
  word-break: break-word;
}

.upload-file-size {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.upload-file-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.3s ease;
}

.upload-file-remove:hover {
  background: rgba(255, 0, 0, 1);
}

/* Wyświetlanie załączników (widok) */
.attachments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.attachment-item {
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.attachment-thumbnail {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
  display: block;
  margin: 0 auto 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.attachment-thumbnail:hover {
  transform: scale(1.05);
}

.attachment-video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 4px;
  display: block;
  margin: 0 auto 8px;
}

.attachment-info {
  text-align: center;
}

.attachment-name {
  display: block;
  font-size: 13px;
  color: #0482ff;
  text-decoration: none;
  margin-bottom: 4px;
  word-break: break-word;
}

.attachment-name:hover {
  text-decoration: underline;
}

.attachment-size {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.attachments-empty {
  padding: 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}
