/* Process Image Data tab styles */
.upload-dropzone {
  border: 2px dashed #4CAF50;
  border-radius: 5px;
  background-color: #f3f9f3;
  padding: 30px;
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.upload-dropzone:hover {
  background-color: #e8f5e9;
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone-inner svg {
  color: #4CAF50;
  margin-bottom: 15px;
}

.dropzone-inner p {
  font-size: 16px;
  margin-bottom: 10px;
}

.drop-or {
  margin: 10px 0;
  color: #777;
}

.location-selector {
  margin-bottom: 20px;
}

.location-selector h3 {
  margin-bottom: 10px;
  font-weight: 500;
}

.form-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 10px;
}

.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.preview-item {
  position: relative;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.upload-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.upload-progress {
  margin-bottom: 20px;
}

.progress-text {
  font-size: 14px;
  color: #4CAF50;
  font-weight: 500;
  margin-bottom: 8px;
  text-align: center;
}

.progress-bar {
  height: 10px;
  background-color: #f1f1f1;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}

.progress-fill {
  height: 100%;
  background-color: #4CAF50;
  width: 0%;
  transition: width 0.3s;
}

/* AI Analysis loading indicators */
.spinner, .ai-spinner, .upload-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(76, 175, 80, 0.3);
  border-radius: 50%;
  border-top-color: #4CAF50;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
}

.ai-spinner {
  width: 40px;
  height: 40px;
  border-width: 4px;
  margin: 10px auto;
  display: block;
}

.upload-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(33, 150, 243, 0.3);
  border-top-color: #2196F3;
  border-width: 4px;
  margin: 10px auto;
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.analysis-status, .upload-status {
  background-color: #f3f9f3;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #4CAF50;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.analysis-status h3 {
  margin-top: 0;
  color: #2E7D32;
}

.analysis-status.success {
  background-color: #e8f5e9;
  border-left-color: #4CAF50;
}

.upload-status {
  background-color: #f3f8ff;
  border-left-color: #2196F3;
}

.upload-status.success {
  background-color: #f3f9f3;
  border-left-color: #4CAF50;
}

.upload-status.error {
  background-color: #fff3f3;
  border-left-color: #f44336;
}

.upload-status-detail {
  color: #666;
  font-size: 14px;
  margin-top: 10px;
  line-height: 1.4;
}

.upload-result {
  color: #4CAF50;
  font-weight: 500;
  font-size: 14px;
}

.analysis-status.error, .upload-status.error {
  background-color: #ffebee;
  border-left-color: #f44336;
}

.analysis-status svg {
  vertical-align: middle;
  margin-right: 5px;
}

.ai-status-detail {
  font-style: italic;
  color: #666;
  margin-top: 5px;
}

.results-container {
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
  border: 1px solid #ddd;
  min-height: 150px;
}

/* API Test Response Styling */
.debug-output {
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  background-color: #f5f5f5;
  max-height: 500px;
  overflow-y: auto;
}

.success-message {
  background-color: #e8f5e9;
  border-left: 4px solid #4CAF50;
  padding: 15px;
  border-radius: 4px;
}

.error-message {
  background-color: #ffebee;
  border-left: 4px solid #F44336;
  padding: 15px;
  border-radius: 4px;
}

.json-response {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  font-family: monospace;
  font-size: 13px;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  margin: 10px 0;
}

.error-json {
  background-color: #fff8f8;
  border-color: #ffcdd2;
}

.response-details {
  margin-top: 15px;
  margin-bottom: 15px;
}

.response-details h4 {
  margin-bottom: 8px;
  color: #555;
}

.note {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 15px;
}

/* Dark Theme Support */
body.dark-theme .results-container {
  background-color: #2c2c2c !important;
  border: 1px solid #404040 !important;
  color: #ffffff !important;
}

body.dark-theme .debug-output {
  background-color: #383838 !important;
  color: #ffffff !important;
  border: 1px solid #404040 !important;
}

body.dark-theme .success-message {
  background-color: #1b5e20 !important;
  color: #ffffff !important;
  border-left: 4px solid #66BB6A !important;
}

body.dark-theme .error-message {
  background-color: #c62828 !important;
  color: #ffffff !important;
  border-left: 4px solid #ef5350 !important;
}

body.dark-theme .response-details h4 {
  color: #ffffff !important;
}

body.dark-theme .note {
  color: #cccccc !important;
}

body.dark-theme .item-note {
  color: #cccccc !important;
}
