/* Upload Progress Bar Styles */

#upload-progress-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.upload-progress-floating {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  width: 350px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.upload-progress-floating.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.upload-progress-floating.error {
  background: #fff5f5;
  border-color: #dc3545;
}

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  color: #fff;
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  font-size: 14px;
}

.upload-progress-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.upload-progress-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.upload-progress-close:hover {
  opacity: 0.8;
}

.upload-progress-bar-container {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  position: relative;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0056b3 0%, #0070cc 100%);
  width: 0%;
  transition: width 0.2s ease;
  box-shadow: 0 0 8px rgba(0, 86, 179, 0.4);
}

.upload-progress-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: 12px;
  color: #495057;
  border-bottom: 1px solid #e9ecef;
}

.upload-progress-percentage {
  font-weight: 700;
  color: #0056b3;
  font-size: 16px;
}

.upload-progress-size {
  font-size: 12px;
  color: #6c757d;
}

.upload-progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 11px;
  color: #6c757d;
  gap: 8px;
}

.upload-progress-speed,
.upload-progress-eta {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-progress-cancel-btn {
  background: #dc3545;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.upload-progress-cancel-btn:hover {
  background: #c82333;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  #upload-progress-container {
    bottom: 10px;
    right: 10px;
    left: 10px;
  }

  .upload-progress-floating {
    width: 100%;
    max-width: calc(100vw - 20px);
  }

  .upload-progress-header {
    font-size: 13px;
  }

  .upload-progress-title {
    max-width: calc(100% - 40px);
  }

  .upload-progress-percentage {
    font-size: 14px;
  }

  .upload-progress-footer {
    font-size: 10px;
    flex-wrap: wrap;
  }

  .upload-progress-cancel-btn {
    padding: 3px 8px;
    font-size: 10px;
  }
}

/* Error state */
.upload-progress-floating.error .upload-progress-header {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.upload-progress-floating.error .upload-progress-bar {
  background: #dc3545;
}
