/* File Upload Component Styles */
.file-upload-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.file-upload-dropzone {
  border: 2px dashed #555DFF;
  border-radius: 12px;
  padding: 1.5rem; /* More condensed */
  text-align: center;
  background: linear-gradient(135deg, #00091E 0%, rgba(85, 93, 255, 0.08) 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.file-upload-dropzone:hover {
  border-color: #444DEE;
  background: linear-gradient(135deg, #00091E 0%, rgba(85, 93, 255, 0.12) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(85, 93, 255, 0.3);
}

.file-upload-dropzone.drag-over {
  border-color: #00B894;
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.1) 0%, rgba(0, 168, 133, 0.1) 100%);
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 184, 148, 0.4);
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.file-upload-icon {
  color: #555DFF;
  transition: color 0.3s ease;
}

.file-upload-dropzone:hover .file-upload-icon {
  color: #444DEE;
}

.file-upload-dropzone.drag-over .file-upload-icon {
  color: #00B894;
}

.file-upload-text {
  color: #ffffff;
}

.file-upload-primary {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #FFFFFF;
  font-family: 'Archivo', sans-serif;
}

.file-upload-secondary {
  font-size: 0.9rem;
  margin: 0.5rem 0 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Archivo', sans-serif;
}

.file-upload-hint {
  font-size: 0.8rem;
  margin: 0.25rem 0 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Archivo', sans-serif;
}

.file-upload-button {
  background: #555DFF;
  color: #FFFFFF;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Archivo', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(85, 93, 255, 0.3);
}

.file-upload-button:hover {
  background: #444DEE;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(85, 93, 255, 0.4);
}

.file-upload-button:active {
  transform: translateY(0);
}

/* Preview Styles */
.file-upload-preview {
  background: linear-gradient(135deg, #00091E 0%, rgba(85, 93, 255, 0.08) 100%);
  border-radius: 12px;
  padding: 1.25rem; /* More condensed */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(85, 93, 255, 0.2);
  backdrop-filter: blur(10px);
}

.file-upload-preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#previewImage {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}

.file-upload-preview-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: #FFFFFF;
  font-size: 0.9rem;
  font-family: 'Archivo', sans-serif;
}

#previewFilename {
  font-weight: 500;
  color: #FFFFFF;
  word-break: break-all;
  text-align: center;
}

#previewSize {
  color: rgba(255, 255, 255, 0.7);
}

.file-upload-preview-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
}

.file-upload-upload-btn,
.file-upload-cancel-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Archivo', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
  justify-content: center;
}

.file-upload-upload-btn {
  background: #00B894;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.file-upload-upload-btn:hover {
  background: #00A085;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.4);
}

.file-upload-upload-btn:disabled {
  background: rgba(85, 93, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.file-upload-cancel-btn {
  background: rgba(85, 93, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(85, 93, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.file-upload-cancel-btn:hover {
  background: rgba(85, 93, 255, 0.15);
  border-color: rgba(85, 93, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.upload-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Progress Styles */
.file-upload-progress {
  margin-top: 1rem;
}

.file-upload-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(85, 93, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.file-upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #555DFF, #444DEE);
  border-radius: 4px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(85, 93, 255, 0.6);
}

.file-upload-progress-text {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 500;
}

/* Error Styles */
.file-upload-error {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 85, 88, 0.1);
  border: 1px solid rgba(255, 85, 88, 0.3);
  border-radius: 8px;
  color: #FF5558;
  text-align: center;
  font-family: 'Archivo', sans-serif;
}

#errorMessage {
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 480px) {
  .file-upload-dropzone {
    padding: 1.5rem;
  }

  .file-upload-primary {
    font-size: 1rem;
  }

  .file-upload-secondary {
    font-size: 0.85rem;
  }

  .file-upload-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }

  .file-upload-preview {
    padding: 1rem;
  }

  #previewImage {
    max-height: 200px;
  }

  .file-upload-preview-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .file-upload-upload-btn,
  .file-upload-cancel-btn {
    width: 100%;
  }
}

/* Animation for successful upload */
@keyframes uploadSuccess {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
}

.upload-success {
  animation: uploadSuccess 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus styles for accessibility */
.file-upload-button:focus,
.file-upload-upload-btn:focus,
.file-upload-cancel-btn:focus {
  outline: 2px solid #555DFF;
  outline-offset: 2px;
}

/* Loading state */
.file-upload-container.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Modal Styles */
.file-upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.file-upload-modal-overlay {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.file-upload-modal-content {
  background: linear-gradient(135deg, #00091E 0%, rgba(85, 93, 255, 0.08) 100%);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(85, 93, 255, 0.2);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.file-upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem; /* More condensed */
  border-bottom: 1px solid rgba(85, 93, 255, 0.2);
  background: linear-gradient(135deg, #00091E 0%, rgba(85, 93, 255, 0.03) 100%);
}

.file-upload-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFFFFF;
  font-family: 'Archivo', sans-serif;
}

.file-upload-modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; /* More condensed */
  height: 36px;
  border: 1px solid rgba(85, 93, 255, 0.2);
}

.file-upload-modal-close:hover {
  background: rgba(85, 93, 255, 0.1);
  color: #555DFF;
  border-color: rgba(85, 93, 255, 0.4);
}

.file-upload-modal-body {
  padding: 1.5rem;
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

/* Hidden state for animations */
.file-upload-container.hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-upload-container.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive modal */
@media (max-width: 576px) {
  .file-upload-modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .file-upload-modal-header {
    padding: 1rem;
  }

  .file-upload-modal-body {
    padding: 1rem;
    max-height: calc(100vh - 140px);
  }
}
