/* Base Styling */
.custom-card {
  background-color: white; /* Dark blue for card background */
  border: none;
  border-radius: 12px;
  min-height: 400px;
  max-height: max-content;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
}

.custom-card-header {
  background-color: transparent;
  color: #66b3ff;
  font-weight: bold;
  font-size: 1.2rem;
  border-bottom: none;
  text-align: center;
  padding: 15px 20px;
}

.custom-card-body {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-text {
  display: block;
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 10px;
}

/* File Input Styling */
.file-input {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
}

/* Progress Bar Styling */
.progress-bar {
  width: 100%;
  background-color: #ffffff;
  border-radius: 5px;
  overflow: hidden;
  height: 24px;
  position: relative;
  display: none;
  margin-top: 20px;
}

.progress {
  height: 100%;
  background: linear-gradient(to right, #66b3ff, #00509e);
  width: 0%;
  border-radius: 5px;
  transition: width 0.4s ease;
}

.progress-text {
  position: absolute;
  right: 10px;
  top: 0;
  font-size: 0.85rem;
  color: #004080;
  line-height: 24px;
}

/* Loading Spinner */
.loading-spinner {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #66b3ff;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* File Preview */
.file-preview {
  margin-top: 25px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  background-color: #e6f0ff;
  padding: 15px;
  border-radius: 8px;
  width: max-content;
}

.file-preview img {
  width: 150px;
  height: 120px;
  border-radius: 5px;
  border: 2px solid #66b3ff;
}

.file-info {
  text-align: left;
}

.file-name,
.file-size {
  font-size: 1rem;
  color: #004080;
}

/* Hidden class to toggle visibility */
.hidden {
  display: none;
}

/* Responsive Adjustments */

/* Small screens (tablets, 768px and below) */
@media (max-width: 768px) {
  .custom-card {
    height: auto;
    padding: 15px;
  }

  .custom-card-header {
    font-size: 1rem;
    padding: 10px 15px;
  }

  .custom-card-body {
    padding: 15px;
  }

  .upload-text {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .progress-bar {
    height: 20px;
  }

  .progress-text {
    font-size: 0.8rem;
  }

  .file-preview {
    padding: 10px;
    gap: 10px;
    width: 100%;
  }

  .file-preview img {
    width: 60px;
    height: 60px;
  }

  .file-name,
  .file-size {
    font-size: 0.9rem;
  }
}

/* Extra-small screens (mobile devices, 576px and below) */
@media (max-width: 576px) {
  .custom-card {
    height: auto;
    padding: 10px;
  }

  .custom-card-header {
    font-size: 0.9rem;
    padding: 8px 10px;
  }

  .custom-card-body {
    padding: 10px;
  }

  .upload-text {
    font-size: 0.9rem;
  }

  .note {
    font-size: 0.8rem;
  }

  .progress-bar {
    height: 18px;
  }

  .progress-text {
    font-size: 0.75rem;
  }

  .file-preview {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 8px;
    width: 100%;
  }

  .file-preview img {
    width: 50px;
    height: 50px;
  }

  .file-name,
  .file-size {
    font-size: 0.85rem;
  }
}
