/* Style for invalid inputs after form submission */
/* `user-` is a new CSS syntax that triggers only after the user interacted with the form */
/* should be widely supported by browsers */
input:user-invalid {
  border-color: #dc3545;
  background-color: #fff;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

input:user-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Add error message styling */
input:user-invalid + .error-message {
  color: #dc3545;
  font-size: 0.875em;
  margin-top: 0.25rem;
}

.star-rating .stars i {
  color: #ffc107; /* Bootstrap's warning color - yellow */
  font-size: 1.25rem;
  cursor: pointer;
}

.star-rating .stars i.bi-star {
  color: #dee2e6; /* Bootstrap's gray-300 */
}

/* Image processing states */
.btn.processing-images {
  opacity: 0.7;
  cursor: not-allowed;
}

.dynamic-form-file-input:disabled + .form-text {
  color: #6c757d;
}

/* Upload progress styling */
/* ===========================================================-------------- */
progress[id*="form_uploads_progress_"] {
  width: 100%;
  height: 20px;
  border: none;
  border-radius: 8px;
  background-color: #e9ecef;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* WebKit browsers (Chrome, Safari, Edge) */
progress[id*="form_uploads_progress_"]::-webkit-progress-bar {
  background-color: #e9ecef;
  border-radius: 8px;
}

progress[id*="form_uploads_progress_"]::-webkit-progress-value {
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
  border-radius: 8px;
  transition: width 0.3s ease;
}

/* Firefox */
progress[id*="form_uploads_progress_"]::-moz-progress-bar {
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
  border-radius: 8px;
}

/* Upload status text styling */
div[id*="form_uploads_status_"] {
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
}

/* Upload progress container */
.upload-progress-container {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
}

.upload-progress-container progress {
  margin-bottom: 8px;
}
