/* =========================================
   Permit Atlas - Professional Enterprise Style
   ========================================= */

/* Professional Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #1B365D;
  --primary-dark: #132744;
  --primary-light: #2a4a7a;
  --accent: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-light: #f8f9fa;
  --text-dark: #1a202c;
  --text-muted: #6c757d;
  --border: #e2e8f0;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--gray-100);
  min-height: 100vh;
  color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
}

/* Navbar */
.navbar-light-custom {
  background: white !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1030;
}

.navbar-light-custom .navbar-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary) !important;
  letter-spacing: -0.02em;
}

.navbar-light-custom .navbar-brand i {
  color: var(--primary-light);
}

.navbar-light-custom .nav-link {
  color: #374151 !important;
  font-weight: 500;
  padding: 8px 16px;
  font-size: 0.95rem;
}

.navbar-light-custom .nav-link:hover {
  color: var(--primary) !important;
}

/* Hero Section */
.hero-section {
  padding: 80px 0;
  background-color: var(--primary);
}

.hero-section .display-3 {
  letter-spacing: -0.03em;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

/* Cards */
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  background-color: var(--gray-100);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

/* Feature Icons */
.feature-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Forms */
.form-control {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.1);
}

/* Tables */
.table thead th {
  background-color: var(--gray-100);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

/* Footer */
footer {
  margin-top: auto !important;
}

footer.bg-dark {
  background-color: #1a202c !important;
}

footer.bg-dark .text-muted,
footer.bg-dark .text-white-50 {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 6px 12px;
}

/* Utility */
.bg-primary {
  background-color: var(--primary) !important;
}

.text-primary {
  color: var(--primary) !important;
}

/* Sticky Footer */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 40px 0;
  }
  
  .hero-section .display-3 {
    font-size: 2.5rem;
  }
}

/* Map */
.map-container {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Loading Overlay - hidden by default */
#loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

#loading-overlay.active {
  display: flex;
}

/* Permit Verdict Badges */
.permit-verdict {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}

.permit-verdict.required {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.permit-verdict.not {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.permit-verdict.verify {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Permit Verdict Badges - Updated Colors */
.permit-verdict.required {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.permit-verdict.not {
  background-color: #e5e7eb;
  color: #4b5563;
  border: 1px solid #9ca3af;
}

.permit-verdict.verify {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

/* Remove dotted focus outline on search bar */
#geocoder .mapboxgl-ctrl-geocoder,
#geocoder .mapboxgl-ctrl-geocoder--input,
.mapboxgl-ctrl-geocoder:focus,
.mapboxgl-ctrl-geocoder--input:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Mobile-first lookup page layout */
@media (max-width: 1199px) {
  .results-row {
    display: flex;
    flex-direction: column;
  }
  
  /* Results appear first on mobile */
  .results-column {
    order: 1;
  }
  
  /* Map appears second on mobile */
  .map-column {
    order: 2;
  }
}

/* Desktop keeps side-by-side layout */
@media (min-width: 1200px) {
  .results-row {
    display: flex;
    flex-direction: row;
  }
  
  .map-column {
    order: 1;
  }
  
  .results-column {
    order: 2;
  }
}

/* Ensure navbar dropdowns appear above all content */
.navbar .dropdown-menu {
  z-index: 1031;
}
