:root {
  --golden-ratio: 1.618;
  --gr-content: 61.8%;
  --gr-sidebar: 38.2%;
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

.dark-theme {
    background-color: #333;
    color: #fff;
}

.dark-theme .card {
    background-color: #444;
    color: #fff;
}

.dark-theme .navbar {
    background-color: #222 !important;
}

h1 {
    text-align: center;
}

/* Shared UI styles */
.card {
  border: none;
  border-radius: 0.35rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.15);
}

.card-header {
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #e3e6f0;
  background-color: #f8f9fc;
  color: #4e73df;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .08em;
}

.btn {
  border-radius: .35rem;
  font-weight: 600;
}

.navbar {
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.15);
}

/* Utilities */
.rounded-lg { border-radius: .5rem !important; }
.shadow { box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.15) !important; }
.text-muted { color: #6c757d !important; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .container { padding: 0 15px; }
  h1 { font-size: 1.5rem; }
}

/* Google Places Autocomplete Styles */
.pac-container {
  z-index: 9999 !important;
  position: absolute !important;
  background-color: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  max-height: 300px !important;
  overflow-y: auto !important;
}

.pac-item {
  padding: 12px 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
}

.pac-item:hover {
  background-color: #f8f9fa !important;
}

.pac-item:last-child {
  border-bottom: none !important;
}

.pac-icon {
  margin-right: 12px !important;
  color: #6c757d !important;
}

.pac-item-query {
  font-weight: 600 !important;
  color: #212529 !important;
}

.pac-matched {
  font-weight: 700 !important;
  color: #e52d27 !important;
}

.pac-secondary-text {
  color: #6c757d !important;
  font-size: 0.9em !important;
}

/* Ensure autocomplete appears above modal */
.modal-open .pac-container {
  z-index: 1060 !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* Golden Ratio Utilities */
.gr-hero {
  display: grid;
  grid-template-columns: var(--gr-content) var(--gr-sidebar);
  gap: 2rem;
}

.gr-card {
  aspect-ratio: calc(1 / var(--golden-ratio));
}

.gr-spacing {
  padding-block: calc(1rem * var(--golden-ratio));
}

.gr-text-lg { font-size: calc(1rem * var(--golden-ratio)); }
.gr-text-xl { font-size: calc(1rem * var(--golden-ratio) * var(--golden-ratio)); }
.gr-text-xxl { font-size: calc(1rem * var(--golden-ratio) * var(--golden-ratio) * var(--golden-ratio)); }

/* Design Tokens (with safe fallbacks) */
:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.12);

  /* Brand tokens and mapped consumable tokens */
  --brand-primary: #4f46e5;
  --brand-secondary: #64748b;
  /* Pages can override --primary-color/--secondary-color; default to brand */
  --primary-color: var(--brand-primary);
  --secondary-color: var(--brand-secondary);
  --success-color: #16a34a;
  --warning-color: #f59e0b;
  --danger-color: #dc2626;
  --info-color: #0ea5e9;

  --bg-color: #ffffff;
  --bg-muted: #f8fafc;
  --text-color: #0f172a;
  --text-muted: #64748b;
}

/* Base & Typography */
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text-color);
  background-color: var(--bg-color);
}
h1, h2, h3, h4, h5, h6 { color: var(--text-color); line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
small, .text-muted { color: var(--text-muted) !important; }

/* Containers */
.container, .container-fluid { padding-left: 16px; padding-right: 16px; }
@media (min-width: 992px) { .container { padding-left: 24px; padding-right: 24px; } }

/* Navbar */
.navbar {
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(140%) blur(6px);
}
.navbar .nav-link { color: #334155; font-weight: 500; }
.navbar .nav-link:hover { color: var(--primary-color); }
.navbar .navbar-brand { font-weight: 700; letter-spacing: .2px; }

/* Buttons */
.btn { border-radius: var(--radius-md); font-weight: 600; transition: transform .15s ease, box-shadow .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); box-shadow: 0 6px 16px rgba(79,70,229,.25); }
.btn-primary:hover { filter: brightness(.95); box-shadow: 0 10px 24px rgba(79,70,229,.25); }
.btn-outline-primary { color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary:hover { background-color: var(--primary-color); color: #fff; }
.btn-danger { background-color: var(--danger-color); border-color: var(--danger-color); }
.btn-success { background-color: var(--success-color); border-color: var(--success-color); }

/* Cards */
.card { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid #e5e7eb; }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { background-color: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.table-card .card-header { background: transparent; }

/* Forms */
.form-control, .form-select, .input-group-text { border-radius: var(--radius-md); border: 2px solid #e5e7eb; }
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 .2rem rgba(79,70,229,.15); }

/* Tables */
.table thead th { background-color: #f8fafc; color: var(--primary-color); font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; }
.table-hover tbody tr:hover { background-color: #f9fafb; }

/* Badges */
.badge.bg-primary { background-color: var(--primary-color) !important; }
.badge.bg-success { background-color: var(--success-color) !important; }
.badge.bg-warning { background-color: var(--warning-color) !important; color: #111827; }
.badge.bg-danger { background-color: var(--danger-color) !important; }

/* Footer */
footer { box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
footer a { color: #cbd5e1; }
footer a:hover { color: #fff; }

/* Listing Cards */
.listing-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: none; text-decoration: none; color: inherit; display: block; }
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: inherit; }
.listing-image { height: 200px; background: linear-gradient(45deg, #f8f9fa, #e9ecef); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--primary-color); }
.listing-price { font-size: 1.25rem; font-weight: 700; color: var(--primary-color); }

/* Hero & Sections */
.hero-section { position: relative; overflow: hidden; }
.hero-section .search-box { border-radius: 999px; box-shadow: var(--shadow-md); }
.section { padding-block: clamp(2rem, 1.5rem + 2vw, 4rem); }

/* Responsive Golden Ratio grid helper */
.gr-hero { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 992px) { .gr-hero { grid-template-columns: var(--gr-content) var(--gr-sidebar); gap: 2rem; } }

/* Dark theme extensions */
.dark-theme { background-color: #0b1220; color: #e5e7eb; }
.dark-theme .card { background-color: #0f172a; border-color: #172032; box-shadow: none; }
.dark-theme .navbar { background-color: rgba(2,6,23,.6) !important; }
.dark-theme .table thead th { background-color: #0f172a; color: #c7d2fe; }
.dark-theme .form-control, .dark-theme .form-select { background-color: #0b1220; color: #e5e7eb; border-color: #1f2937; }
.dark-theme .btn-outline-primary { color: #c7d2fe; border-color: #6366f1; }

/* Utility helpers */
.shadow-sm-2 { box-shadow: var(--shadow-sm) !important; }
.shadow-md-2 { box-shadow: var(--shadow-md) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.text-secondary-600 { color: var(--secondary-color) !important; }

/* Mobile touch-friendly tweaks */
@media (max-width: 576px) {
  .btn, .form-control, .form-select, .input-group-text { font-size: 16px; }
  .btn { padding: 0.55rem 1rem; }
  .navbar .navbar-brand { font-size: 1.1rem; }
}

/* Location text display - show on mobile and desktop appropriately */
#navLocationText {
  display: inline;
  font-size: 0.875rem;
  font-weight: 500;
}
@media (max-width: 576px) {
  #navLocationText {
    display: none;
  }
}

/* Global: if a navbar contains an offcanvas toggle, hide the collapse toggler to avoid duplicate menus */
@media (max-width: 991.98px) {
  .navbar .btn[data-bs-toggle="offcanvas"] ~ .navbar-toggler { display: none !important; }
}

/* Offcanvas nav links */
.offcanvas .nav-link { color: #334155; font-weight: 600; padding: 10px 8px; border-radius: 8px; }
.offcanvas .nav-link:hover { background: #f1f5f9; color: var(--primary-color); }
.offcanvas .nav-link.text-danger { color: #dc2626; }

/* Themed offcanvas matching sidebar (blue gradient) */
.offcanvas.bg-sidebar {
  background: linear-gradient(135deg, #007bff 0%, #6c757d 100%);
  color: #fff;
}
.offcanvas.bg-sidebar .offcanvas-title { color: #fff; }
.offcanvas.bg-sidebar .nav-link { color: rgba(255,255,255,0.85); }
.offcanvas.bg-sidebar .nav-link:hover,
.offcanvas.bg-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,0.2); }

/* Defensive: ensure backdrop never blocks clicks if present */
.offcanvas-backdrop.show { opacity: 0.2; }

/* Categories Section Styles */
.categories-section {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.categories-slider {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-slider::-webkit-scrollbar {
  display: none;
}

.categories-slider .d-flex {
  width: max-content;
  min-width: 100%;
}

.category-item {
  flex: 0 0 auto;
  width: 80px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0 4px;
}

.category-item:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: white;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-item:hover .category-icon {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transform: scale(1.05);
}

.category-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
  margin-top: 8px;
  transition: color 0.2s ease;
}

.category-item:hover .category-name {
  color: #667eea;
}

/* Responsive Categories */
@media (min-width: 576px) {
  .category-item {
    width: 90px;
  }

  .category-icon {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .category-name {
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .category-item {
    width: 100px;
  }

  .category-icon {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }

  .category-name {
    font-size: 14px;
  }
}

/* Modern Design System Variables */
:root {
  /* Modern Color Palette */
  --fx-primary: #6366f1;
  --fx-primary-light: #818cf8;
  --fx-primary-dark: #4f46e5;
  --fx-secondary: #f59e0b;
  --fx-accent: #ef4444;
  --fx-success: #10b981;
  --fx-warning: #f59e0b;
  --fx-error: #ef4444;

  /* Neutral Colors */
  --fx-surface: #ffffff;
  --fx-surface-2: #f8fafc;
  --fx-surface-3: #f1f5f9;
  --fx-muted: #64748b;
  --fx-muted-light: #94a3b8;
  --fx-text: #0f172a;
  --fx-text-light: #475569;
  --fx-sub: #64748b;

  /* Modern Shadows */
  --fx-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --fx-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --fx-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --fx-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --fx-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Modern Border Radius */
  --fx-radius-sm: 8px;
  --fx-radius: 12px;
  --fx-radius-md: 16px;
  --fx-radius-lg: 20px;
  --fx-radius-xl: 24px;
  --fx-radius-full: 9999px;

  /* Modern Transitions */
  --fx-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --fx-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --fx-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
  color: var(--fx-text);
  background-color: var(--fx-surface-2);
  line-height: 1.6;
}

/* Modern Card Designs - Instagram Style */
.fx-card{
  background: var(--fx-surface);
  border-radius: var(--fx-radius-lg);
  box-shadow: var(--fx-shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: var(--fx-transition);
  position: relative;
  overflow: hidden;
}

.fx-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: rgba(99, 102, 241, 0.2);
}

/* Instagram-style listing card layout */
.fx-listing-slide .fx-card {
  max-width: 500px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
}

.fx-listing-slide .fx-card-img {
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.fx-listing-slide .listing-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.fx-listing-slide .fx-card:hover .listing-img {
  transform: scale(1.05);
}

.fx-listing-slide .fx-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 12px 16px 8px;
  line-height: 1.3;
  color: var(--fx-text);
}

.fx-listing-slide .fx-meta {
  font-size: 0.9rem;
  color: var(--fx-text-muted);
  margin: 0 16px;
  line-height: 1.4;
}

.fx-listing-slide .fx-card-body {
  padding: 0 16px 16px;
}

/* Modern Navbar */
.navbar {
  box-shadow: var(--fx-shadow);
  backdrop-filter: saturate(140%) blur(6px);
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar .nav-link {
  color: var(--fx-text);
  font-weight: 500;
  transition: var(--fx-transition);
}

.navbar .nav-link:hover {
  color: var(--fx-primary);
}

.navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fx-text) !important;
}

/* Modern Buttons */
.btn {
  border-radius: var(--fx-radius-md);
  font-weight: 600;
  transition: var(--fx-transition);
  border: none;
}

.btn-primary {
  background: var(--fx-gradient-primary);
  border: none;
  box-shadow: var(--fx-shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--fx-shadow-lg);
  background: var(--fx-gradient-primary);
}

.btn-outline-primary {
  color: var(--fx-primary);
  border-color: var(--fx-primary);
  border: 2px solid;
}

.btn-outline-primary:hover {
  background: var(--fx-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--fx-shadow-md);
}

/* Modern Form Controls */
.form-control, .form-select, .input-group-text {
  border-radius: var(--fx-radius-md);
  border: 2px solid rgba(0, 0, 0, 0.1);
  transition: var(--fx-transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--fx-primary);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

/* Modern Images */
.listing-img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--fx-radius-md);
  background: var(--fx-gradient-primary);
  transition: var(--fx-transition);
}

/* Vertical listing feed (Instagram-style) */
.fx-listing-carousel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: 70vh;
  padding: 8px;
  scroll-behavior: smooth;
  position: relative;
}

/* Hide scrollbar for all browsers */
.fx-listing-carousel::-webkit-scrollbar {
  display: none;
}

.fx-listing-carousel {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.fx-listing-slide {
  width: 100%;
  scroll-snap-align: start;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading indicator for infinite scroll */
.fx-listing-carousel::after {
  content: '';
  display: block;
  height: 40px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  margin: 0 auto;
  width: 60%;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Mobile optimization for Instagram-style feed */
@media (max-width: 768px) {
  .fx-listing-carousel {
    gap: 16px;
    padding: 4px;
    max-height: 75vh;
  }
  
  .fx-listing-slide .fx-card {
    max-width: 100%;
    border-radius: 12px;
  }
  
  .fx-listing-slide .fx-card-img {
    height: 250px;
    border-radius: 12px 12px 0 0;
  }
  
  .fx-listing-slide .fx-card-title {
    font-size: 1rem;
    margin: 10px 12px 6px;
  }
  
  .fx-listing-slide .fx-meta {
    font-size: 0.85rem;
    margin: 0 12px;
  }
  
  .fx-listing-slide .fx-card-body {
    padding: 0 12px 12px;
  }
}

/* Modern Typography */
.fx-section-title{
  font-weight: 700;
  color: var(--fx-text);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin: 0 0 24px 0;
  letter-spacing: -0.025em;
}

/* Modern Container Spacing */
.container {
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 992px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Modern Responsive Grid */
@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Modern Page Transitions - consolidated */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.loaded .page-transition {
  opacity: 1;
  transform: translateY(0);
}

/* Leaflet map styling */
.leaflet-container {
  height: 100%;
  width: 100%;
  z-index: 1;
}

.leaflet-popup-content {
  margin: 8px 12px;
  font-family: inherit;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.fx-address-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.fx-address-card.has-address {
  border-color: rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, #eef2ff, #ffffff);
}

.fx-address-card.address-missing {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.fx-address-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-size: 1.4rem;
}

.fx-address-card.address-missing .fx-address-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.fx-address-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-address-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.fx-address-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(79, 70, 229, 0.12);
  color: #4338ca;
  letter-spacing: 0.05em;
}

.fx-address-card.address-missing .fx-address-chip {
  background: rgba(217, 119, 6, 0.18);
  color: #b45309;
}

.fx-address-details {
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.85);
}

.fx-address-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.82rem;
  color: rgba(15, 23, 42, 0.6);
}

.fx-address-meta i {
  margin-right: 6px;
  color: rgba(37, 99, 235, 0.8);
}

.fx-address-card.address-missing .fx-address-meta i {
  color: rgba(217, 119, 6, 0.9);
}

.fx-address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-address-actions .btn {
  font-weight: 600;
  border-radius: 999px;
  padding-inline: 18px;
}

@media (max-width: 767.98px) {
  .fx-address-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .fx-address-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .fx-address-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .fx-address-actions {
    width: 100%;
  }

  .fx-address-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.fx-address-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  transition: all 0.25s ease;
}

.fx-address-pill.has-address {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 64, 175, 0.35);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.fx-address-pill.address-missing {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.55);
  color: #421e05;
  box-shadow: 0 10px 20px rgba(250, 204, 21, 0.25);
}

.fx-address-pill .pill-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  color: inherit;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.fx-address-pill.address-missing .pill-icon {
  background: rgba(251, 191, 36, 0.3);
}

.fx-address-pill .pill-body {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.fx-address-pill .pill-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
}

.fx-address-pill.address-missing .pill-label {
  background: rgba(217, 119, 6, 0.2);
}

.fx-address-pill .pill-summary,
.fx-address-pill .pill-meta {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .fx-address-pill {
    gap: 12px;
    padding: 12px 18px;
    backdrop-filter: blur(12px);
  }

  .fx-address-pill .pill-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .fx-address-pill .pill-body {
    gap: 8px 12px;
  }

  .fx-address-pill .pill-label {
    font-size: 0.75rem;
    padding: 3px 10px;
  }

  .fx-address-pill .pill-summary,
  .fx-address-pill .pill-meta {
    font-size: 0.9rem;
  }
}

.fx-address-pill .pill-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: inherit;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.fx-address-pill .pill-action:hover {
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
}

.fx-address-pill.address-missing .pill-action {
  border-color: rgba(217, 119, 6, 0.6);
  color: #92400e;
}

.fx-address-pill.address-missing .pill-action:hover {
  background: rgba(217, 119, 6, 0.15);
}

/* Header nav search */
.fx-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.fx-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-wrap: nowrap;
}

@media (max-width: 991.98px) {
  .fx-nav-container {
    flex-wrap: nowrap;
  }

  .fx-nav-actions {
    flex: 0 0 auto;
  }
}

@media (max-width: 575.98px) {
  .fx-nav-actions {
    flex: 0 0 auto;
  }

  .fx-nav-icon-btn {
    width: 36px;
    height: 36px;
  }
}

.fx-nav-location-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.2s ease;
  text-decoration: none;
  max-width: min(360px, 62vw);
  white-space: nowrap;
  cursor: pointer;
}

.fx-nav-location-chip i {
  font-size: 0.9rem;
}

.fx-nav-location-chip .chip-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
  color: rgba(29, 78, 216, 0.8);
}

.fx-nav-location-chip .chip-place {
  color: #1e3a8a;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-nav-location-chip .chip-icon {
  font-size: 0.75rem;
  color: rgba(29, 78, 216, 0.65);
}

.fx-nav-location-chip:hover,
.fx-nav-location-chip:focus-visible {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1d4ed8;
  outline: none;
}

.fx-nav-location-chip.missing {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.25);
  color: #92400e;
}

.fx-nav-location-chip.missing .chip-label {
  color: rgba(146, 64, 14, 0.75);
}

.fx-nav-location-chip.missing .chip-place {
  color: #92400e;
}

.fx-nav-location-chip:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.fx-nav-location-chip + .fx-nav-search {
  margin-left: 4px;
}

@media (max-width: 575.98px) {
  .fx-nav-location-chip {
    width: 100%;
    justify-content: space-between;
    max-width: none;
  }

  .fx-nav-location-chip .chip-place {
    max-width: 100px;
  }
}

.fx-nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.85);
  transition: all 0.2s ease;
  text-decoration: none;
}

.fx-nav-icon-btn i {
  font-size: 1.05rem;
}

.fx-nav-icon-btn:hover,
.fx-nav-icon-btn:focus-visible {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  outline: none;
}

.fx-nav-icon-btn:active {
  transform: scale(0.96);
}

@media (max-width: 575.98px) {
  .fx-address-pill {
    flex-wrap: wrap;
    padding: 14px;
    border-radius: 20px;
    gap: 10px;
  }

  .fx-address-pill .pill-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .fx-address-pill .pill-summary,
  .fx-address-pill .pill-meta {
    white-space: normal;
  }

  .fx-address-pill .pill-action {
    width: 100%;
    justify-content: center;
  }
}

/* Location feedback styling */
#locationFeedback {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Location text improvements */
#locationModal .modal-dialog {
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
}

#locationModal .modal-content {
  height: 100vh;
  border-radius: 0;
  border: none;
}

#locationModal .modal-body {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

#locationModal .modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem;
  flex-shrink: 0;
}

/* Modern Ripple Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}
