:root {
  --primary-color: #325A73; /* New Blue */
  --primary-hover-color: #28485c; /* Darker New Blue for hover */
  --secondary-color: #6c757d; /* Medium Gray */
  --secondary-hover-color: #5a6268;
  --light-gray-color: #f8f9fa; /* Background for cards/sections */
  --border-color: #dee2e6; /* Standard border color */
  --text-color: #325A73; /* New Blue for text and headings */
  --text-muted-color: #495057; /* Lighter gray for secondary text */
  --background-color: #f4f7f9; /* Page background */
  --white-color: #ffffff;
  --input-bg-color: #fdfdfd; /* Off-white for inputs */
  --error-color: #dc3545;
  --success-color: #28a745;

  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-size-base: 1rem; /* 16px */
  --line-height-base: 1.6;
  
  --border-radius: 0.375rem; /* 6px */
  --border-radius-lg: 0.5rem; /* 8px */
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

body {
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

/* Wizard Container */
.wizard-container {
  background: var(--white-color);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
  max-width: 900px;
  margin: 2rem auto;
}

/* Header Section */
.header-section {
  margin-bottom: 2rem;
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.header-section h1 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 1.75rem; /* Slightly reduced */
  font-weight: 600;
}

.page-subtitle {
  color: var(--text-muted-color);
  font-size: 1rem;
  margin: 0;
}

/* Initial Guide Section */
.initial-guide {
  background-color: var(--light-gray-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.initial-guide h2 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
}

.initial-guide p {
  margin-bottom: 0.75rem;
  color: var(--text-muted-color);
  font-size: 0.95rem;
}

.initial-guide ul {
  padding-left: 1.5rem;
  margin-bottom: 0;
  list-style-type: disc; /* Standard bullets */
}

.initial-guide ul li {
  margin-bottom: 0.4rem;
  color: var(--text-muted-color);
  font-size: 0.9rem;
}

.initial-guide strong {
  font-weight: 600;
  color: var(--text-color);
}

/* Progress Bar */
.wizard-progress {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 17px; /* Align with the center of the circles */
  left: 10%; 
  right: 10%;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.progress-step {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--secondary-color);
  font-weight: 500;
  flex: 1;
  font-size: 0.875rem;
}

.progress-step::before {
  content: attr(data-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: #e9ecef; /* Neutral background for inactive step */
  color: var(--secondary-color);
  font-weight: bold;
  border: 3px solid var(--white-color); /* Creates a 'cutout' effect */
  position: relative;
  z-index: 2;
  box-shadow: var(--box-shadow);
}

.progress-step.active {
  color: var(--primary-color);
}

.progress-step.active::before {
  background: var(--primary-color);
  color: var(--white-color);
}

/* Wizard Steps */
.wizard-step {
  display: none;
  padding: 1.5rem 0 0; /* Added top padding */
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

.wizard-step > h2 {
  font-size: 1.6rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

/* Form Layout and Elements */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500; /* Slightly less bold */
  margin-bottom: 0.5rem;
  color: var(--text-muted-color);
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  color: var(--text-color);
  background-color: var(--input-bg-color);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="file"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group .hint {
  font-size: 0.8rem;
  color: var(--secondary-color);
  margin-top: 0.25rem;
}

.form-group .invalid-feedback {
    display: block;
    color: var(--error-color);
    font-size: 0.875em;
    margin-top: 0.25rem;
}

/* Field Guide Styling (Informational Cards) */
.field-guide {
  background-color: var(--light-gray-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem; /* Space above the card */
}

.field-guide h2, .field-guide h3 {
  font-size: 1.15rem;
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
}

.field-guide p {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted-color);
  font-size: 0.9rem;
}

.field-guide ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  list-style-type: disc;
}

.field-guide ul li {
  margin-bottom: 0.4rem;
  color: var(--text-muted-color);
  font-size: 0.875rem;
}

.field-guide strong {
  font-weight: 600;
  color: var(--text-color);
}

/* Selling Points specific layout */
.selling-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Image Upload Styling */
.upload-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.image-upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.upload-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.upload-preview span {
  font-size: 2rem;
  color: #adb5bd;
}

.upload-box {
  flex: 1 0 400px;
  width: 400px;
  height: 300px;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  position: relative;
  overflow: hidden;
  background-color: var(--white-color);
}

.remove-image-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.8;
}

.remove-image-btn:hover {
  opacity: 1;
}

.upload-status {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
  z-index: 2;
}

.upload-status.ok {
  color: #28a745;
}

.upload-status.error {
  color: #dc3545;
}

.upload-box.has-image .upload-preview span {
  display: none;
}

.upload-box.has-image .remove-image-btn {
  display: flex;
}

.remove-image-btn {
  display: none;
}

.upload-box:hover {
  border-color: var(--primary-color);
  background-color: #fdfdfd; /* Very light hover */
}

.upload-box p {
  margin: 0.5rem 0 0;
  color: var(--secondary-color);
  font-size: 0.85rem;
}

.upload-box .upload-icon {
  font-size: 1.75rem; /* Slightly smaller icon */
  color: #adb5bd;
}

.upload-box img.image-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--border-radius-lg) - 2px); /* Adjust for border */
  z-index: 1;
}

/* Buttons */
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.nav-buttons button {
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  min-width: 160px; 
}

.nav-buttons button.secondary {
  background-color: var(--secondary-color);
  color: var(--white-color);
  border-color: var(--secondary-color);
}

.nav-buttons button.secondary:hover {
  background-color: var(--secondary-hover-color);
  border-color: var(--secondary-hover-color);
  box-shadow: var(--box-shadow);
}

.nav-buttons button.secondary:disabled {
  background-color: #adb5bd;
  border-color: #adb5bd;
  cursor: not-allowed;
  box-shadow: none;
}

.nav-buttons button.next-step,
.nav-buttons button[type="submit"] {
  background-color: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
}

.nav-buttons button.next-step:hover,
.nav-buttons button[type="submit"]:hover {
  background-color: var(--primary-hover-color);
  border-color: var(--primary-hover-color);
  box-shadow: var(--box-shadow);
  transform: translateY(-1px);
}

.nav-buttons button:active {
    transform: translateY(0px);
    box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1050; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: var(--white-color);
    margin: 10% auto; 
    padding: 2rem;
    border: 1px solid #888; /* Fallback border */
    border-color: var(--border-color);
    width: 90%; 
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--box-shadow-lg);
}

.modal-content h2 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.5em;
    font-weight: 600;
}

.modal-content p {
    color: var(--text-muted-color);
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.loader {
    border: 6px solid var(--light-gray-color); 
    border-top: 6px solid var(--primary-color); 
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .wizard-container {
    padding: 1rem;
    margin: 1rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .upload-container {
    flex-direction: column;
  }
  .upload-box {
    width: 100%;
    height: 300px;
  }
  .form-actions {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-buttons button {
    width: 100%;
  }
  .modal-content {
    width: 90%;
    padding: 1.5rem;
  }
  .header-section h1 {
    font-size: 1.5rem;
  }
  .page-subtitle {
    font-size: 0.9rem;
  }
  .wizard-step > h2 {
    font-size: 1.3rem;
  }
}

/* Navigation buttons container in wizard */
.nav-buttons {
  /* display: flex; is set by JS when the container becomes active */
  justify-content: space-between;
  gap: 1rem; /* Optional: for spacing if buttons get close */
  margin-top: 1.5rem; /* Space above the buttons */
  width: 100%; /* Ensure the container spans the full width */
}

/* Use My Location button */
#use_location {
  padding: 0.5rem 1rem;
  background-color: var(--secondary-color);
  color: var(--white-color);
  border: 1px solid var(--secondary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
}

#use_location:hover {
  background-color: var(--secondary-hover-color);
  border-color: var(--secondary-hover-color);
}
