/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0B1310; /* deep green black */
  color: #EAF7F1; /* Text Primary */
  padding: 0.5rem;
  line-height: 1.6;
  margin: 0;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 0.75rem;
  background-color: #111B16; /* Surface / Cards */
  padding: 0.75rem;
  border-bottom: 2px solid #10B981; /* Primary emerald */
  border-radius: 0.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #10B981; /* Primary emerald */
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.7); /* emerald sparkling effect */
}

header p {
  font-size: 1rem;
  color: #A9C7B9; /* Text Muted */
}

/* Main Container */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Input Column */
.input-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Preview Column */
.preview-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Full width sections (for FAQ, How-to, etc.) */
.full-width-section {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

/* Card */
.card {
  background: #111B16; /* Surface / Cards */
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); /* Primary shadow */
  margin-bottom: 0.75rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #A9C7B9; /* Text Muted */
  display: block;
  margin-bottom: 0.5rem;
}

input[type="file"],
input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #1B2A22; /* Borders */
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #EAF7F1; /* Text Primary */
  background-color: #111B16; /* Surface */
  box-shadow: inset 0 0 5px rgba(16, 185, 129, 0.2); /* Subtle emerald sparkle */
}

input[type="file"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #10B981; /* Primary */
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7); /* Enhanced emerald sparkle */
}

/* Location Group */
.location-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.coordinates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Buttons */
.primary-btn {
  background: #10B981; /* Primary */
  color: #EAF7F1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
  width: 100%;
}

.primary-btn:hover {
  background: #059669; /* Darker emerald */
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.8); /* Enhanced emerald sparkle */
}

.secondary-btn {
  background: #111B16; /* Surface */
  color: #FBBF24; /* Secondary gold */
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}

.secondary-btn:hover {
  background: #1B2A22; /* Borders as hover bg */
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); /* emerald hover effect */
}

/* Map */
#map {
  height: 500px;
  border-radius: 0.5rem;
  width: 100%;
}

/* Image Previews */
.image-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.image-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.business-input-container {
  flex: 1;
  min-width: 200px;
}

/* Tags */
.tags-container {
  margin-top: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: #111B16; /* Surface */
  padding: 0.25rem 0.5rem;
  margin: 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #EAF7F1; /* Text Primary */
}

.tag:hover .tag-controls {
  display: inline;
}

.tag-controls {
  display: none;
  margin-left: 0.5rem;
}

.tag-controls span {
  cursor: pointer;
  margin-left: 0.25rem;
  color: #10B981; /* Primary */
}

.tag-input {
  display: none;
  width: auto;
  padding: 0.25rem;
  border: 1px solid #1B2A22; /* Borders */
  border-radius: 0.25rem;
  background-color: #111B16; /* Surface */
  color: #EAF7F1; /* Text Primary */
}

/* Download Section */
.download-section {
  margin-top: 0.75rem;
}

.success {
  background: #111B16; /* Surface */
  padding: 1rem;
  border-left: 4px solid #10B981; /* Primary */
  border-radius: 0.5rem;
  color: #FBBF24; /* Secondary gold */
}

.download-option {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.download-option label {
  color: #EAF7F1; /* Text Primary */
}

.download-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #10B981; /* Primary */
  color: #EAF7F1;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.3s, box-shadow 0.3s;
}

.download-btn:hover {
  background: #059669; /* Darker emerald */
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7); /* emerald sparkle */
}

/* Error Message */
.error-message {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #111B16; /* Surface */
  color: #10B981; /* Primary */
  border-radius: 0.5rem;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.5); /* Subtle glow */
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#loading-spinner {
  border: 8px solid #111B16; /* Surface */
  border-top: 8px solid #10B981; /* Primary */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

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

body.loading * {
  pointer-events: none;
}

/* Floating Contact/Feedback Widget */
.floating-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1500;
  background: #111B16;
  border: 2px solid #10B981;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.floating-widget:hover {
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.7);
  transform: translateY(-2px);
}

.floating-widget-button {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #EAF7F1;
  font-weight: 600;
}

.floating-widget-button svg {
  width: 20px;
  height: 20px;
}

.floating-widget-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.floating-widget-content {
  background: #111B16;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 2px solid #10B981;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.5);
}

.floating-widget-content h3 {
  color: #10B981;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.floating-widget-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #1B2A22;
}

.floating-widget-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  color: #A9C7B9;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}

.floating-widget-tab.active {
  color: #10B981;
  border-bottom-color: #10B981;
}

.floating-widget-tab:hover {
  color: #EAF7F1;
}

.floating-widget-form {
  display: none;
}

.floating-widget-form.active {
  display: block;
}

.floating-widget-form input,
.floating-widget-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #1B2A22;
  border-radius: 0.5rem;
  background: #0B1310;
  color: #EAF7F1;
  font-family: inherit;
}

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

.floating-widget-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #A9C7B9;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.floating-widget-close:hover {
  background: #1B2A22;
  color: #FBBF24;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 0.25rem;
  }
  
  .container {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .image-preview-container {
    flex-direction: column;
  }

  .image-preview {
    max-width: 100%;
  }

  .coordinates {
    grid-template-columns: 1fr;
  }
  
  .floating-widget {
    bottom: 1rem;
    right: 1rem;
  }
  
  .floating-widget-button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}