/* Image Preview Container */
.fl-image-preview-container {
  margin: 5px 0;
  padding: 20px;
  background-color: #fafafa;
  text-align: center;
}

.fl-remove-image-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  background-color: #dc3232;
  color: white;
}

.fl-remove-image-btn:hover {
  background-color: #a00;
}

/* Final Preview */
.fl-final-preview {
  max-width: 100%;
}

.fl-final-image {
  max-width: 300px;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fl-final-controls {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.fl-success-text {
  color: #46b450;
  font-weight: 500;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .fl-final-controls {
    flex-direction: column;
    align-items: center;
  }

  .fl-remove-image-btn {
    width: 100%;
    max-width: 200px;
  }

  .fl-final-image {
    max-width: 100%;
    height: auto;
  }
}

/* Loading States */
.fl-loading {
  opacity: 0.6;
  pointer-events: none;
}

.fl-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: fl-spin 1s linear infinite;
}

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

/* File Input Enhancement */
input[type='file'][name='UploadFile']:hover {
  border-color: #0073aa;
}

input[type='file'][name='UploadFile']:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

/* Upload Container States */
.upload-image {
  transition: all 0.3s ease;
}
.upload-image.fl-has-image input[type='file'][name='UploadFile'] {
  border-color: #46b450;
  background-color: #f8fff8;
}

/* With a photo chosen, the preview replaces the drop zone. Each site's
   Additional CSS sizes the transparent input to 116px through #upload and only
   hides it for the old plugins' {sport}-has-image class, so the id is needed
   here to win. Hidden, the input still submits its file. */
.apply-to-coach-item.upload-image.fl-has-image input#upload,
.apply-to-coach-item.upload-image.fl-has-image > label {
  display: none;
}

