/* Error messages */
.upload-error-message,
.error-box {
  border-radius: 4px;
  padding: 10px;
  display: none;
  white-space: pre-wrap;
}

.upload-error-message {
  background-color: #fce4e4;
  border: 1px solid #f5c2c2;
}

.error-box {
	position: relative;
	background-color: #ffaca6;
	color: brown;
	margin-bottom: 30px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.2);
	font-family: Arial, sans-serif;
	white-space: pre-line;
	border: .5px solid #f88;
	display: flex;
	gap: 1rem;
	padding: 2rem;
	justify-content: sstart;
	align-items: start;
}

/* Close button inside error box */
.close-btn {
  position: absolute;
  top: 5px;
  right: 8px;
  background: transparent;
  border: none;
  color: brown;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}
.close-btn:focus {
  outline: 2px solid white;
}

/* Upload box styles */
.upload-box {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}
.upload-box input[type="file"] {
  display: none;
}
.upload-box.drag-over {
  background-color: #f0f0f0;
  border-color: #007bff;
}
.upload-box.drop-zone {
  width: 100%;
  margin-bottom: 1rem;
}
.upload-box.drop-zone:hover {
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, #fdf6f0, #fff8f3) padding-box, 
              linear-gradient(60deg, #fe5000, #fab200) border-box;
}

/* Upload icon */
.upload-icon {
  font-size: 40px;
  color: #666;
  margin-bottom: 10px;
}

/* Upload progress */
.upload-progress {
  position: relative;
  height: 10px;
  background: #eee;
  border-radius: 6px;
  margin: 10px 0;
}
.upload-progress__bar {
  height: 100%;
  background: #4caf50;
  border-radius: 6px;
  transition: width .2s;
}
.upload-progress__text {
  position: absolute;
  top: -18px;
  right: 0;
  font-size: .85rem;
}

.upload-content {
  width: 45%;
  min-width: 20rem;
}


/* File list styles */
.file-list-item,
.fileList .file-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}
.fileList .file-list-item {
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
  padding: 1rem;
  margin: 0;
}
.fileList .file-list-item:first-child {
  border-top: 1px solid #ccc;
}

/* File info */
.file-info,
.fileList .file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.file-info img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.file-info span,
.fileList .file-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

/* Buttons inside file list */
.file-list-item button,
.fileList button {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

/* PDF icon */
.pdf-icon {
  font-size: 30px;
  color: #d9534f;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover effect for file list items */
.file-list-item:hover {
  background: linear-gradient(135deg, #fdf6f0, #fff8f3) padding-box;
}

/* ===============================
   Progressbar
   =============================== */
.file-list-item.uploading {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.upload-progress {
  position: relative;
  flex: 1;
  height: 20px;
  background: #eee;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.upload-progress__bar {
  height: 100%;
  width: 0%;
  background: #06A77D;
  transition: width 0.2s linear;
}

  .upload-progress__text {
  position: absolute;
  top: 50%;
  left:50%;
  text-align: center;
  transform: translate(-50%,-50%);
  font-size: 0.75rem;
  color: #fff;
  font-weight: bold;
  pointer-events: none;
  white-space: nowrap; /* verhindert Zeilenumbruch */
}


.upload-progress__cancel {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
}
.upload-progress__cancel img {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.upload-progress__cancel:hover img {
  opacity: 1;
}

/* ===============================
   Status: Success & Error
   =============================== */
.file-list-item.uploading.success .upload-progress__bar {
  background: #06A77D;; /* grün */
}

.file-list-item.uploading.error .upload-progress__bar {
  background: #f44336; /* rot */
}

/* ===============================
   Fadeout Animation
   =============================== */
.file-list-item.uploading.success,
.file-list-item.uploading.error {
  animation: fadeOut 0.5s ease forwards;
  animation-delay: 0.5s; /* nach halber Sekunde verschwinden */
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-5px);
    height: 0;
    margin: 0;
    padding: 0;
  }
}

/* Pac-Man Basis */
.pacman {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: 
    radial-gradient(6% 6% at 60% 25%, #000 90%, #0000),
    radial-gradient(circle at 35% 35%, #0000 70%, #0005) #fc0;
  clip-path: polygon(
    0 0, 100% 0, 100% 25%, 50% 50%, 
    100% 75%, 100% 100%, 0 100%
  );
  animation: pacman-mouth 0.4s infinite;
  z-index: 10;
}

@keyframes pacman-mouth {
  0% {
    clip-path: polygon(
      0 0, 100% 0, 100% 25%, 50% 50%, 
      100% 75%, 100% 100%, 0 100%
    );
  }
  50% {
    clip-path: polygon(
      0 0, 100% 0, 100% 45%, 50% 50%, 
      100% 55%, 100% 100%, 0 100%
    );
  }
  100% {
    clip-path: polygon(
      0 0, 100% 0, 100% 25%, 50% 50%, 
      100% 75%, 100% 100%, 0 100%
    );
  }
}

.file-list-item.deleting {
  position: relative;
 
}
ul.fileList{
  padding:0;
}
.upload-content label {
  font-weight: 400!important;
}

.filename {
	color: brown;
	margin: .5rem;
}
.error-svg {
	width: 100px;
	margin: 1rem 1rem;
}

.upload-content h5 {
	font-weight: 500;
	font-size: 1.5rem;
}

