/* ============================================================
   Flash Design System Override — Map Page Typography
   Lori / Flash Design System / 2026-03-03
   ============================================================ */
.map-page,
.map-page * {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.map-page h1,
.map-page h2,
.map-page h3,
.map-page h4,
.location-name,
.panel-title,
.info-title,
.chat-header h3,
.filter-panel h3 {
  font-family: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   MODERN TOOLBAR LAYOUT
   ======================================== */

/* Page wrapper - flexbox column layout */
.map-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px); /* Full height minus site header */
  margin-top: 70px; /* Space for fixed header */
}

/* Fixed toolbar at top */
.map-toolbar {
  flex-shrink: 0;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  z-index: 100;
  position: relative; /* For filter panel positioning */
}

.dark-mode .map-toolbar {
  background: #1a1a1a;
  border-bottom-color: #333;
}

/* Toolbar rows */
.toolbar-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}

.toolbar-main {
  border-bottom: 1px solid #f0f0f0;
}

.dark-mode .toolbar-main {
  border-bottom-color: #2a2a2a;
}

.toolbar-filters {
  padding: 8px 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Back button */
.toolbar-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toolbar-back-btn:hover {
  background: #e0e0e0;
}

.dark-mode .toolbar-back-btn {
  background: #2a2a2a;
  color: #fff;
}

.dark-mode .toolbar-back-btn:hover {
  background: #3a3a3a;
}

/* Search input in toolbar */
.toolbar-search {
  flex: 1;
  max-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
}

.toolbar-search .search-icon {
  position: absolute;
  left: 14px;
  color: #999;
  font-size: 14px;
  pointer-events: none;
}

.toolbar-search .search-input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  font-size: 14px;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.toolbar-search .search-input:focus {
  border-color: #f39c12;
  background: white;
  outline: none;
}

.dark-mode .toolbar-search .search-input {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: white;
}

.dark-mode .toolbar-search .search-input:focus {
  border-color: #f39c12;
  background: #333;
}

.toolbar-search .clear-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-search .clear-search-btn:hover {
  color: #e74c3c;
}

/* Toolbar action buttons */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  background: white;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toolbar-btn:hover {
  border-color: #f39c12;
  color: #f39c12;
}

.toolbar-btn.active {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  border-color: transparent;
  color: white;
}

.dark-mode .toolbar-btn {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #ccc;
}

.dark-mode .toolbar-btn:hover {
  border-color: #f39c12;
  color: #f39c12;
}

/* Sort select in toolbar */
.toolbar-actions .sort-select {
  padding: 10px 32px 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  background: white
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  appearance: none;
  min-width: 100px;
}

.dark-mode .toolbar-actions .sort-select {
  background-color: #2a2a2a;
  border-color: #3a3a3a;
  color: #ccc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ccc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* View toggle in toolbar */
.toolbar-row .view-toggle-container {
  margin-top: 0;
  margin-left: auto;
}

/* Main content area */
.map-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.map-content #map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* List view in new layout */
.map-content .list-view-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-top: 0; /* No padding needed - toolbar handles spacing */
  overflow-y: auto;
}

/* Filter panel dropdown */
.filter-panel {
  position: fixed;
  top: auto;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slideDown 0.2s ease;
}

/* Filter panel backdrop for mobile */
.filter-panel-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.filter-panel-backdrop.show {
  display: block;
}

/* Desktop: centered in middle of page */
@media (min-width: 481px) {
  .filter-panel {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    max-width: 400px;
    min-width: 320px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
  }

  .filter-panel-backdrop.show {
    display: block;
  }
}

/* Mobile: bottom sheet style */
@media (max-width: 480px) {
  .filter-panel-backdrop.show {
    display: block;
  }

  .filter-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }

  .filter-panel-content {
    padding: 20px;
  }

  .filter-panel-header {
    margin-bottom: 16px;
  }

  .filter-panel-header h3 {
    font-size: 18px;
  }

  .filter-group {
    flex-direction: column;
    gap: 12px;
  }

  .filter-option {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8f9fa;
  }

  .dark-mode .filter-option {
    background: rgba(255, 255, 255, 0.08);
  }

  .filter-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  .filter-label {
    font-size: 15px;
    gap: 10px;
  }

  .filter-label i {
    font-size: 18px;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-panel-content {
  padding: 16px;
  max-width: 600px;
}

.filter-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.filter-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.filter-panel-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.filter-panel-close:hover {
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
}

.dark-mode .filter-panel {
  background: #2a2a2a;
  border-color: #444;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dark-mode .filter-panel-header h3 {
  color: #ecf0f1;
}

.dark-mode .filter-panel-close {
  color: #999;
}

.dark-mode .filter-panel-close:hover {
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.2);
}

/* Info modal */
.info-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.info-modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: calc(100% - 40px);
  margin: 20px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
  .info-modal-content {
    padding: 20px;
    margin: 16px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .info-modal-content h3 {
    font-size: 16px;
  }

  .info-modal-content p {
    font-size: 14px;
  }

  .info-highlight {
    padding: 12px;
    gap: 10px;
  }

  .info-highlight i {
    font-size: 20px;
  }

  .info-features {
    gap: 8px;
  }

  .info-feature i {
    font-size: 18px;
  }

  .info-feature span {
    font-size: 10px;
  }
}

.info-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
}

.info-modal-close:hover {
  color: #e74c3c;
}

.info-modal-content h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-modal-content h3 i {
  color: #f39c12;
}

.info-modal-content p {
  color: #666;
  line-height: 1.5;
  margin-bottom: 16px;
}

.dark-mode .info-modal-content {
  background: #2a2a2a;
}

.dark-mode .info-modal-content p {
  color: #aaa;
}

/* Category chips in toolbar */
.toolbar-filters .category-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.toolbar-filters .location-count {
  font-size: 13px;
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}

.dark-mode .toolbar-filters .location-count {
  color: #999;
}

/* ========================================
   RESPONSIVE TOOLBAR
   ======================================== */

@media (max-width: 768px) {
  .map-page {
    height: 100vh;
    height: 100dvh; /* Use dynamic viewport height for mobile browsers */
    margin-top: 0; /* Remove margin since header is hidden */
  }

  .toolbar-row {
    padding: 10px 12px;
    gap: 8px;
  }

  .toolbar-main {
    flex-wrap: wrap;
  }

  .toolbar-search {
    max-width: none;
    flex: 1 1 100%;
    order: 2;
  }

  .toolbar-back-btn {
    order: 1;
  }

  .toolbar-actions {
    order: 3;
    flex: 0 0 auto;
  }

  .view-toggle-container {
    order: 4;
    flex: 0 0 auto;
  }

  .toolbar-search .search-input {
    padding: 10px 36px 10px 36px;
    font-size: 14px;
  }

  .toolbar-btn .btn-text {
    display: none;
  }

  .toolbar-btn {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }

  .toolbar-actions .sort-select {
    min-width: 80px;
    padding: 8px 28px 8px 10px;
    font-size: 12px;
  }

  .view-toggle-btn span {
    display: none;
  }

  .view-toggle-btn {
    padding: 8px 12px;
    min-width: 44px;
    min-height: 44px;
  }

  .toolbar-filters {
    padding: 8px 12px;
  }

  .toolbar-filters .category-chips-container {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .toolbar-filters .category-chips-container::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    flex-shrink: 0;
  }

  .category-chip span {
    display: none;
  }

  .category-chip {
    padding: 8px 12px;
    min-height: 36px;
  }

  .toolbar-filters .location-count {
    flex-shrink: 0;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .toolbar-row {
    padding: 8px 10px;
    gap: 6px;
  }

  .toolbar-actions {
    gap: 4px;
  }

  .toolbar-back-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .toolbar-search .search-input {
    padding: 10px 32px 10px 32px;
    font-size: 14px;
  }

  .toolbar-btn {
    padding: 8px;
    min-width: 40px;
    min-height: 40px;
  }

  .sort-container {
    display: none;
  }

  .view-toggle-container {
    margin-left: 0;
  }

  .category-chip {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* ========================================
   LEGACY STYLES (keep for compatibility)
   ======================================== */

/* Map container and overlay */
.map-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 100px);
  /* Full height minus header */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Style for new PlaceAutocompleteElement */
gmp-place-autocomplete,
#place-autocomplete {
  flex: 1;
  min-width: 250px;
  font-size: 1rem;
}

gmp-place-autocomplete input,
#place-autocomplete input {
  padding: 12px 16px !important;
  border: 2px solid #e9ecef !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
  outline: none !important;
  transition: border-color 0.3s ease !important;
  background: white !important;
  width: 100% !important;
}

.dark-mode gmp-place-autocomplete input,
.dark-mode #place-autocomplete input {
  background: #2c2c2c !important;
  border-color: #444 !important;
  color: white !important;
}

gmp-place-autocomplete input:focus,
#place-autocomplete input:focus {
  border-color: #f39c12 !important;
}

#map {
  width: 100%;
  height: 100%;
}

/* Floating Back Button */
.floating-back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2000;
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none !important;
  transition: all 0.3s ease;
}

.floating-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.floating-back-btn i {
  font-size: 16px;
}

/* Enhanced Search overlay positioned on top of map */
.search-overlay {
  position: absolute;
  top: 100px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: auto;
  max-width: 900px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.dark-mode .search-overlay {
  background: rgba(30, 30, 30, 0.98);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Search bar container */
.search-bar-container {
  display: flex;
  gap: 10px;
  align-items: stretch;
  position: relative;
}

/* Search input wrapper with icon */
.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  min-width: 400px;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: #95a5a6;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.dark-mode .search-icon {
  color: #7f8c8d;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
  background: white;
  font-family: "Roboto", sans-serif;
}

.search-input::placeholder {
  color: #95a5a6;
}

.dark-mode .search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.dark-mode .search-input::placeholder {
  color: #7f8c8d;
}

.search-input:focus {
  border-color: #f39c12;
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
}

.dark-mode .search-input:focus {
  border-color: #f39c12;
  box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.15);
}

/* Clear search button */
.clear-search-btn {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  color: #7f8c8d;
  cursor: pointer;
  padding: 0;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.clear-search-btn:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.clear-search-btn:active {
  transform: translateY(0);
}

.dark-mode .clear-search-btn {
  background: #2c3e50;
  border-color: #34495e;
  color: #95a5a6;
}

.dark-mode .clear-search-btn:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: white;
}

/* Info toggle button */
.info-toggle-btn {
  background: #3498db;
  border: none;
  color: white;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  width: auto;
  margin-left: auto;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.info-toggle-btn i {
  font-size: 16px;
}

.info-toggle-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.info-toggle-btn:active {
  transform: translateY(0);
}

.info-toggle-btn.active {
  background: #f39c12;
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.dark-mode .info-toggle-btn {
  background: #2980b9;
}

.dark-mode .info-toggle-btn:hover {
  background: #3498db;
}

/* Info Tooltip */
.info-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  padding: 20px;
  border: 2px solid rgba(52, 152, 219, 0.2);
  animation: slideDown 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dark-mode .info-tooltip {
  background: rgba(30, 30, 30, 0.98);
  border-color: rgba(52, 152, 219, 0.3);
}

.info-tooltip-content {
  position: relative;
}

.info-close-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e74c3c;
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.info-close-btn:hover {
  background: #c0392b;
  transform: scale(1.1);
}

.info-tooltip h3 {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dark-mode .info-tooltip h3 {
  color: #3498db;
}

.info-tooltip h3 i {
  color: #3498db;
  font-size: 20px;
}

.info-tooltip p {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.dark-mode .info-tooltip p {
  color: #bbb;
}

.info-highlight {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
  border-left: 4px solid #f39c12;
  padding: 14px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.dark-mode .info-highlight {
  background: linear-gradient(135deg, #3d3416 0%, #4a3f1a 100%);
  border-left-color: #f39c12;
}

.info-highlight i {
  color: #f39c12;
  font-size: 24px;
  margin-top: 2px;
  flex-shrink: 0;
}

.info-highlight strong {
  color: #856404;
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.dark-mode .info-highlight strong {
  color: #f39c12;
}

.info-highlight p {
  color: #856404;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

.dark-mode .info-highlight p {
  color: #ddb76d;
}

.info-features {
  display: flex;
  gap: 12px;
  justify-content: space-around;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dark-mode .info-features {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.info-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.info-feature i {
  color: #3498db;
  font-size: 20px;
}

.info-feature span {
  color: #555;
  font-size: 11px;
  font-weight: 600;
}

.dark-mode .info-feature span {
  color: #bbb;
}

/* Filter toggle button */
.filter-toggle-btn {
  padding: 0 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-toggle-btn i {
  font-size: 14px;
}

.filter-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  filter: brightness(1.05);
}

.filter-toggle-btn:active {
  transform: translateY(0);
}

.filter-toggle-btn.active {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

/* Filter panel */
.filter-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 16px;
  border: 2px solid rgba(0, 0, 0, 0.05);
  animation: slideDown 0.3s ease;
}

.dark-mode .filter-panel {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dark-mode .filter-option {
  background: rgba(255, 255, 255, 0.05);
}

.filter-option:hover {
  background: rgba(0, 0, 0, 0.06);
}

.dark-mode .filter-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.filter-option input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #f39c12;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #2c3e50;
}

.dark-mode .filter-label {
  color: #ecf0f1;
}

.filter-label i {
  font-size: 14px;
}

/* Location count */
.location-count {
  font-size: 13px;
  color: #7f8c8d;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  align-self: flex-start;
}

.dark-mode .location-count {
  color: #95a5a6;
  background: rgba(255, 255, 255, 0.05);
}

.location-count i {
  font-size: 12px;
  color: #e74c3c;
}

/* Legacy filter-btn for compatibility */
.filter-btn {
  padding: 0 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Coming Soon Overlay */
.coming-soon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  border-radius: 12px;
}

.dark-mode .coming-soon-overlay {
  background: rgba(30, 30, 30, 0.95);
  color: white;
}

.coming-soon-content {
  max-width: 500px;
  padding: 40px;
}

.coming-soon-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.coming-soon-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.6;
}

.dark-mode .coming-soon-subtitle {
  color: #ccc;
}

.coming-soon-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.8;
}

.coming-soon-note {
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
  margin-bottom: 30px;
}

.dark-mode .coming-soon-note {
  color: #aaa;
}

/* Back button styling */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
  color: white;
  text-decoration: none;
}

.dark-mode .back-button {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

/* Disabled search overlay */
.search-overlay.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.search-overlay.disabled .search-input,
.search-overlay.disabled .filter-btn {
  cursor: not-allowed;
}

/* Responsive overlay */
@media (max-width: 768px) {
  .search-overlay {
    display: none;
  }

  .search-bar-container {
    flex-direction: column;
    gap: 10px;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .filter-toggle-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }

  .info-toggle-btn {
    padding: 12px 18px;
  }

  .filter-text {
    display: inline;
  }

  .filter-group {
    flex-direction: column;
    gap: 8px;
  }

  .filter-option {
    width: 100%;
  }

  .location-count {
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .search-overlay {
    top: 10px;
    right: 10px;
    left: 10px;
    padding: 12px;
  }

  .search-input {
    padding: 10px 16px 10px 38px;
    font-size: 13px;
  }

  .search-icon {
    left: 12px;
    font-size: 14px;
  }

  .info-toggle-btn {
    padding: 10px;
    font-size: 13px;
  }

  .info-toggle-btn i {
    font-size: 13px;
  }

  .filter-toggle-btn {
    font-size: 13px;
    padding: 10px 16px;
  }

  .filter-text {
    display: none;
  }

  .info-tooltip {
    padding: 16px;
  }

  .info-tooltip h3 {
    font-size: 16px;
  }

  .info-tooltip p {
    font-size: 13px;
  }

  .info-highlight {
    padding: 12px;
  }

  .info-highlight i {
    font-size: 20px;
  }

  .info-highlight strong {
    font-size: 13px;
  }

  .info-highlight p {
    font-size: 12px;
  }

  .info-features {
    gap: 8px;
  }

  .info-feature i {
    font-size: 18px;
  }

  .info-feature span {
    font-size: 10px;
  }

  .location-count {
    font-size: 12px;
    padding: 6px 10px;
  }
}

@media (max-width: 360px) {
  .search-overlay {
    padding: 10px;
  }

  .search-input {
    font-size: 12px;
  }

  .info-toggle-btn {
    padding: 8px;
    font-size: 12px;
  }

  .info-toggle-btn i {
    font-size: 12px;
  }

  .filter-toggle-btn i {
    font-size: 13px;
  }

  .info-tooltip h3 {
    font-size: 15px;
  }

  .info-tooltip p {
    font-size: 12px;
  }

  .info-highlight {
    padding: 10px;
    gap: 10px;
  }

  .info-highlight strong {
    font-size: 12px;
  }

  .info-highlight p {
    font-size: 11px;
  }

  .info-feature i {
    font-size: 16px;
  }

  .info-feature span {
    font-size: 9px;
  }
}

/* Info window styling */
.info-window {
  max-width: 300px;
  padding: 15px;
}

.info-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.info-username {
  color: #f39c12;
  font-weight: 600;
  margin-bottom: 10px;
}

.info-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.service-badge {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Side panel for location details */
.side-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: white;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.side-panel.open {
  right: 0;
}

/* Side panel mobile improvements */
@media (max-width: 480px) {
  .side-panel {
    width: 100vw;
    right: -100vw;
  }

  .side-panel-header {
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .side-panel-content {
    padding: 16px;
    padding-bottom: 100px; /* Extra space for bottom safe area */
  }

  .close-panel {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sidebar-action-btn {
    padding: 16px 20px;
    font-size: 16px;
    min-height: 52px;
  }
}

.side-panel-header {
  padding: 20px;
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
}

.side-panel-content {
  padding: 20px;
}

.close-panel {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  float: right;
  cursor: pointer;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #f39c12;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Sidebar Action Buttons */
.sidebar-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sidebar-action-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-action-btn i {
  font-size: 14px;
}

.sidebar-btn-primary {
  background: linear-gradient(135deg, #ff9a00 0%, #ff6b00 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  grid-column: 1 / -1;
}

.sidebar-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.35);
  filter: brightness(1.05);
}

.sidebar-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 106, 0, 0.25);
}

.sidebar-btn-message {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  grid-column: 1 / -1;
}

.sidebar-btn-message:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.35);
  filter: brightness(1.05);
}

.sidebar-btn-message:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(118, 75, 162, 0.25);
}

.sidebar-btn-call {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-btn-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  filter: brightness(1.05);
}

.sidebar-btn-call:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.sidebar-btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  filter: brightness(1.05);
}

.sidebar-btn-whatsapp:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.25);
}

.sidebar-btn-secondary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  border: 1px solid #dee2e6;
}

.sidebar-btn-secondary:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.sidebar-btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .sidebar-actions {
    grid-template-columns: 1fr;
  }

  .sidebar-action-btn {
    padding: 14px 18px;
    font-size: 15px;
  }
}

/* Dark mode support */
.dark-mode .side-panel {
  background: #2d2d2d;
  color: white;
}

.dark-mode .side-panel h4 {
  color: #f39c12;
}

.dark-mode .side-panel p,
.dark-mode .side-panel li {
  color: #e0e0e0;
}

.dark-mode .side-panel a {
  color: #4a9eff;
}

.dark-mode .side-panel a:hover {
  color: #6bb3ff;
}

.dark-mode .location-details > div {
  background: #3a3a3a !important;
}

.dark-mode .service-details h4 {
  color: #f39c12;
}

/* Payment Modal */
.payment-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.payment-modal-content {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@media (max-width: 480px) {
  .payment-modal-content {
    padding: 20px;
    width: calc(100% - 32px);
    margin: 16px;
    max-height: calc(90vh - 32px);
    max-height: calc(90dvh - 32px);
  }

  .payment-modal-content h2 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .payment-modal-close {
    width: 44px;
    height: 44px;
    top: 10px;
    right: 10px;
  }

  .qr-code-container {
    padding: 16px;
    margin: 16px 0;
  }
}

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

.dark-mode .payment-modal-content {
  background: #2d2d2d;
  color: white;
}

.payment-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.payment-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.dark-mode .payment-modal-close:hover {
  background: #444;
  color: #fff;
}

.payment-modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: #2c3e50;
}

.dark-mode .payment-modal-content h2 {
  color: #f39c12;
}

.qr-code-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  padding: 20px;
  background: white;
  border-radius: 12px;
}

.dark-mode .qr-code-container {
  background: white;
}

.payment-timer {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #f39c12;
  margin: 10px 0;
}

.payment-amount {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin: 20px 0;
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.payment-instructions {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.6;
}

.dark-mode .payment-instructions {
  background: #3a3a3a;
}

.success-modal h2 {
  color: #27ae60 !important;
}

.payment-details {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.dark-mode .payment-details {
  background: #3a3a3a;
}

.payment-details p {
  margin: 8px 0;
}

.payment-details strong {
  color: #2c3e50;
}

.dark-mode .payment-details strong {
  color: #f39c12;
}

/* Keypad Buttons */
.keypad-btn {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.keypad-btn:hover {
  background: #e8e9ea;
  border-color: #f39c12;
  transform: translateY(-2px);
}

.keypad-btn:active {
  transform: translateY(0);
  background: #d0d1d2;
}

.dark-mode .keypad-btn {
  background: #2c3e50;
  border-color: #34495e;
  color: #ecf0f1;
}

.dark-mode .keypad-btn:hover {
  background: #34495e;
  border-color: #f39c12;
}

.dark-mode .keypad-btn:active {
  background: #1a252f;
}

/* Success Modal Specific Styles */
.payment-info-box {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
}

.dark-mode .payment-info-box {
  background: #2c3e50;
}

.next-steps-box {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: left;
  color: #856404;
}

.dark-mode .next-steps-box {
  background: #3d3416;
  border-color: #f39c12;
  color: #f9e79f;
}

.next-steps-box h4 {
  color: #856404;
}

.dark-mode .next-steps-box h4 {
  color: #f39c12;
}

.phone-link {
  color: #856404;
  font-weight: 600;
  text-decoration: none;
}

.dark-mode .phone-link {
  color: #f39c12;
}

.phone-link:hover {
  text-decoration: underline;
}

/* Lightning Deeplink Button Styles */
.deeplink-btn {
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 20px auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.deeplink-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.deeplink-btn:hover::before {
  left: 100%;
}

.deeplink-btn i {
  font-size: 20px;
}

/* Mobile: Large, prominent button */
.deeplink-btn-mobile {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
  padding: 18px 32px;
  width: 100%;
  max-width: 100%;
  font-size: 18px;
  animation: pulse 2s infinite;
}

.deeplink-btn-mobile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(243, 156, 18, 0.4);
}

.deeplink-btn-mobile:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3);
}

/* Desktop: Less prominent, secondary style */
.deeplink-btn-desktop {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 24px;
  width: auto;
  max-width: 280px;
  font-size: 14px;
}

.deeplink-btn-desktop:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.deeplink-btn-desktop:active {
  transform: translateY(0);
}

/* Subtle pulse animation for mobile */
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.15);
  }
  50% {
    box-shadow: 0 4px 24px rgba(243, 156, 18, 0.35);
  }
}

/* Dark mode support */
.dark-mode .deeplink-btn-mobile {
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.5);
}

.dark-mode .deeplink-btn-desktop {
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .deeplink-btn-mobile {
    padding: 16px 24px;
    font-size: 16px;
  }

  .deeplink-btn-mobile i {
    font-size: 18px;
  }
}

/* Feedback message styling */
#deeplinkFeedback {
  min-height: 20px;
  margin-top: 8px;
}

/* Nostr Chat Widget Styles */
.nostr-chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 10001;
  animation: slideUp 0.3s ease;
}

/* Chat widget mobile improvements */
@media (max-width: 480px) {
  .nostr-chat-container {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 70vh;
    height: 70dvh;
    max-height: 70vh;
    max-height: 70dvh;
    border-radius: 16px 16px 0 0;
  }

  .nostr-chat-header {
    padding: 14px 16px;
    border-radius: 16px 16px 0 0;
  }

  .nostr-chat-input {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .nostr-chat-input textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .chat-send-btn,
  .chat-pay-btn {
    width: 44px;
    height: 44px;
  }
}

.nostr-chat-header {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
  padding: 16px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nostr-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8f9fa;
}

.chat-loading {
  text-align: center;
  padding: 40px 20px;
  color: #7f8c8d;
}

.chat-loading i {
  font-size: 32px;
  color: #f39c12;
  margin-bottom: 12px;
}

.chat-welcome {
  text-align: center;
  padding: 40px 20px;
  color: #2c3e50;
}

.chat-message {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.chat-message.sent {
  align-items: flex-end;
}

.chat-message.sent .message-content {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
  border-radius: 16px 16px 4px 16px;
}

.chat-message.received .message-content {
  background: white;
  color: #2c3e50;
  border-radius: 16px 16px 16px 4px;
}

.message-content {
  padding: 10px 14px;
  max-width: 70%;
  word-wrap: break-word;
}

.message-time {
  font-size: 11px;
  color: #7f8c8d;
  margin-top: 4px;
}

.nostr-chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-radius: 0 0 16px 16px;
  border-top: 1px solid #e0e0e0;
}

.nostr-chat-input textarea {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 10px 16px;
  font-family: Roboto, sans-serif;
  font-size: 14px;
  resize: none;
  max-height: 100px;
  overflow-y: auto;
}

.nostr-chat-input textarea:focus {
  outline: none;
  border-color: #f39c12;
}

.chat-pay-btn {
  background: linear-gradient(135deg, #ff9a00 0%, #ff6b00 100%);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.chat-pay-btn:hover {
  transform: scale(1.1);
}

.chat-pay-btn:active {
  transform: scale(0.95);
}

.chat-send-btn {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.chat-send-btn:hover {
  transform: scale(1.1);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

/* Dark mode for chat widget */
.dark-mode .nostr-chat-container {
  background: #2c3e50;
}

.dark-mode .nostr-chat-messages {
  background: #1a252f;
}

.dark-mode .chat-welcome {
  color: #ecf0f1;
}

.dark-mode .chat-message.received .message-content {
  background: #34495e;
  color: #ecf0f1;
}

.dark-mode .nostr-chat-input {
  background: #2c3e50;
  border-top-color: #34495e;
}

.dark-mode .nostr-chat-input textarea {
  background: #34495e;
  border-color: #4a5f7f;
  color: #ecf0f1;
}

.dark-mode .nostr-chat-input textarea:focus {
  border-color: #f39c12;
}

.dark-mode .chat-pay-btn,
.dark-mode .chat-send-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Opening Hours Collapsible */
details summary {
  transition: color 0.2s ease;
}

details summary:hover {
  color: #2c3e50 !important;
}

details[open] summary {
  margin-bottom: 4px;
}

.dark-mode details summary:hover {
  color: #ecf0f1 !important;
}

.dark-mode details ul {
  color: #95a5a6 !important;
}

/* Responsive design */
@media (max-width: 768px) {
  /* Hide header and footer on mobile for fullscreen map */
  #header-placeholder,
  #footer-placeholder {
    display: none !important;
  }

  /* Show floating back button on mobile - hidden since toolbar has back btn */
  .floating-back-btn {
    display: none !important;
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    /* Prevent overscroll/bounce on iOS */
    overscroll-behavior: none;
  }

  section.container {
    margin: 0 !important;
    padding: 0 !important;
  }

  .map-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1;
  }

  #map {
    width: 100%;
    height: 100%;
  }

  .map-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    min-width: auto;
  }

  .side-panel {
    width: 100%;
    right: -100%;
  }

  .map-title {
    font-size: 2rem;
  }

  .map-subtitle {
    font-size: 1rem;
  }

  /* Google Maps InfoWindow mobile adjustments */
  .gm-style .gm-style-iw-c {
    max-width: calc(100vw - 40px) !important;
    max-width: min(280px, calc(100vw - 40px)) !important;
    padding: 0 !important;
  }

  .gm-style .gm-style-iw-d {
    overflow: auto !important;
    max-height: 60vh !important;
    max-height: 60dvh !important;
  }

  /* Close button on info window */
  .gm-style .gm-ui-hover-effect {
    width: 36px !important;
    height: 36px !important;
    top: 4px !important;
    right: 4px !important;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .gm-style .gm-style-iw-c {
    max-width: 340px !important;
  }
}

/* Desktop large screens */
@media (min-width: 1025px) {
  .gm-style .gm-style-iw-c {
    max-width: 380px !important;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .business-logo,
  .verified-badge,
  .service-badge-icon {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .business-card {
    width: 240px;
    max-width: 240px;
  }

  .gm-style .gm-style-iw-d {
    max-height: 260px !important;
  }

  .actions-section {
    padding: 4px !important;
    gap: 2px !important;
  }

  .action-btn {
    padding: 5px 6px !important;
    font-size: 9px !important;
  }

  .business-header {
    padding: 6px !important;
  }

  .business-logo {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
  }

  .services-section {
    padding: 4px 6px !important;
  }
}

/* Custom marker styles */
.custom-flash-marker {
  cursor: pointer;
  position: relative;
}

.marker-pin {
  width: 36px;
  height: 36px;
  position: relative;
}

.marker-logo-container {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 3px solid white;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.marker-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.custom-flash-marker:hover .marker-logo-container {
  transform: scale(1.15);
}

/* Marker Pulse Animation for Nearby Highlights */
.custom-flash-marker {
  position: relative;
}

.marker-pulse .marker-pin {
  animation: markerBounce 0.5s ease-in-out 4;
}

.marker-pulse .marker-logo-container {
  animation: markerGlow 0.5s ease-in-out 4;
}

/* Expanding ring highlight */
.marker-highlight-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.marker-highlight-ring.ring-animate {
  animation: ringExpand 0.8s ease-out 3;
}

@keyframes markerBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-12px) scale(1.1);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(-6px) scale(1.05);
  }
}

@keyframes markerGlow {
  0%,
  100% {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(243, 156, 18, 1), 0 0 50px rgba(243, 156, 18, 0.6);
  }
}

@keyframes ringExpand {
  0% {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(243, 156, 18, 1);
    opacity: 1;
  }
  100% {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(243, 156, 18, 0);
    opacity: 0;
  }
}

/* Rich InfoWindow Styles */
.business-card {
  width: 300px;
  max-width: 300px;
  min-width: 280px;
  font-family: "Roboto", Arial, sans-serif;
}

/* Responsive popup adjustments */
@media (max-width: 480px) {
  .business-card {
    width: 260px;
    max-width: 260px;
    min-width: 240px;
  }

  .business-name {
    font-size: 13px !important;
  }

  .business-username {
    font-size: 10px !important;
  }

  .action-btn {
    padding: 7px 8px !important;
    font-size: 10px !important;
  }

  .action-btn i {
    font-size: 10px !important;
  }

  .service-badge-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .service-badge-icon i {
    font-size: 14px !important;
  }

  .service-badge-text {
    font-size: 7px !important;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .business-card {
    width: 310px;
    max-width: 310px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .business-card {
    width: 330px;
    max-width: 330px;
  }
}

@media (min-width: 1025px) {
  .business-card {
    width: 360px;
    max-width: 360px;
  }

  .business-name {
    font-size: 18px !important;
  }

  .action-btn {
    padding: 8px 10px !important;
    font-size: 11px !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .action-btn {
    padding: 10px 12px !important;
    font-size: 12px !important;
    min-height: 44px;
  }

  .action-btn i {
    font-size: 12px !important;
  }
}

.business-header {
  text-align: center;
  padding: 12px;
  border-bottom: 1px solid #e9ecef;
}

.business-logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}

.business-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.verified-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.verified-icon {
  color: #27ae60;
  font-size: 18px;
}

.business-name {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin: 6px 0 3px 0;
}

.business-username {
  font-size: 12px;
  color: #f39c12;
  font-weight: 600;
  margin-bottom: 8px;
}

.services-section {
  padding: 8px 12px;
  border-bottom: 1px solid #e9ecef;
}

.services-label {
  font-size: 10px;
  color: #7f8c8d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.service-badges-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.service-badge-icon {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

.service-badge-icon.active {
  opacity: 1;
}

.service-badge-icon i {
  font-size: 18px;
  margin-bottom: 2px;
}

.service-badge-icon.flash-payment {
  color: #f39c12;
}
.service-badge-icon.cash-service {
  color: #3498db;
}
.service-badge-icon.loyalty-rewards {
  color: #e74c3c;
}

.service-badge-text {
  font-size: 8px;
  font-weight: 600;
  margin-top: 1px;
}

.actions-section {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.action-btn {
  padding: 6px 8px;
  border: none;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.action-btn-primary {
  background: linear-gradient(135deg, #ff9a00 0%, #ff6b00 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.35);
  filter: brightness(1.05);
}

.action-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 106, 0, 0.25);
}

/* Message button with modern purple gradient */
.action-btn:has(i.fa-message) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn:has(i.fa-message):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(118, 75, 162, 0.35);
  filter: brightness(1.05);
}

.action-btn:has(i.fa-message):active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(118, 75, 162, 0.25);
}

.action-btn-secondary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  border: 1px solid #dee2e6;
}

.action-btn-secondary:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.action-btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.action-btn i {
  font-size: 10px;
}

/* Additional responsive adjustments for popup content */
@media (max-width: 480px) {
  .services-section {
    padding: 5px 8px !important;
  }

  .services-label {
    font-size: 8px !important;
    margin-bottom: 4px !important;
  }

  .service-badges-container {
    gap: 6px !important;
  }

  .actions-section {
    padding: 5px !important;
    gap: 3px !important;
  }

  .business-header {
    padding: 8px !important;
  }

  .business-logo {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }

  .verified-badge {
    width: 18px !important;
    height: 18px !important;
  }

  .verified-icon {
    font-size: 12px !important;
  }
}

/* Small phone screens */
@media (max-width: 360px) {
  .business-card {
    width: 240px !important;
    max-width: 240px !important;
    min-width: 220px !important;
  }

  .gm-style .gm-style-iw-c {
    max-width: 260px !important;
  }

  .business-name {
    font-size: 12px !important;
  }

  .business-username {
    font-size: 9px !important;
  }

  .action-btn {
    font-size: 9px !important;
    padding: 6px 6px !important;
  }

  .service-badge-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .service-badge-icon i {
    font-size: 12px !important;
  }

  .business-logo {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
  }

  .business-header {
    padding: 6px !important;
  }

  .services-section {
    padding: 4px 6px !important;
  }

  .actions-section {
    padding: 4px !important;
  }
}

/* Large desktop screens */
@media (min-width: 1440px) {
  .business-card {
    width: 380px;
    max-width: 380px;
  }

  .gm-style .gm-style-iw-c {
    max-width: 400px !important;
  }

  .business-name {
    font-size: 19px !important;
  }

  .business-username {
    font-size: 13px !important;
  }

  .action-btn {
    padding: 9px 11px !important;
    font-size: 12px !important;
  }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
  .business-card {
    width: 400px;
    max-width: 400px;
  }

  .gm-style .gm-style-iw-c {
    max-width: 420px !important;
  }
}

/* Override Google Maps default InfoWindow styling for all breakpoints */
.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px !important;
}

.gm-style .gm-style-iw-d {
  overflow: auto !important;
}

.gm-style .gm-style-iw-t::after {
  background: linear-gradient(45deg, white 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0) 100%) !important;
}

/* Ensure buttons are touch-friendly on all mobile devices */
@media (pointer: coarse) {
  .action-btn,
  .sidebar-action-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Service Details Modal */
.service-details {
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #666;
  border-top: 1px solid #e9ecef;
}

.service-details h4 {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  margin: 12px 0 8px 0;
}

.service-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-details li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.service-details li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #27ae60;
  font-weight: 700;
}

/* ========================================
   VIEW TOGGLE
   ======================================== */
.view-toggle-container {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 4px;
  margin-top: 12px;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7f8c8d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.view-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.view-toggle-btn.active {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.dark-mode .view-toggle-container {
  background: rgba(255, 255, 255, 0.05);
}

.dark-mode .view-toggle-btn {
  color: #95a5a6;
}

.dark-mode .view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dark-mode .view-toggle-btn.active {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  color: white;
}

/* ========================================
   SORT SELECT
   ======================================== */
.sort-container {
  position: relative;
  margin-left: 8px;
}

.sort-select {
  appearance: none;
  padding: 10px 36px 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: white
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-width: 130px;
}

.sort-select:focus {
  border-color: #f39c12;
  outline: none;
}

.sort-select:hover {
  border-color: #bbb;
}

.dark-mode .sort-select {
  background-color: #2c3e50;
  border-color: #34495e;
  color: #ecf0f1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ecf0f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.dark-mode .sort-select:focus {
  border-color: #f39c12;
}

/* ========================================
   CATEGORY CHIPS
   ======================================== */
.category-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
}

.category-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  background: white;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-chip:hover {
  border-color: #f39c12;
  color: #f39c12;
}

.category-chip.active {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  border-color: transparent;
  color: white;
}

.category-chip.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.category-chip i {
  font-size: 11px;
}

.dark-mode .category-chip {
  background: #2c3e50;
  border-color: #34495e;
  color: #95a5a6;
}

.dark-mode .category-chip:hover {
  border-color: #f39c12;
  color: #f39c12;
}

.dark-mode .category-chip.active {
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  border-color: transparent;
  color: white;
}

/* ========================================
   AUTOCOMPLETE DROPDOWN
   ======================================== */
.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 1001;
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-list {
  list-style: none;
  padding: 8px;
  margin: 0;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: #f8f9fa;
}

.autocomplete-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.autocomplete-item-info {
  flex: 1;
  min-width: 0;
}

.autocomplete-item-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item-address {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f39c12;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.autocomplete-no-results {
  padding: 20px;
  text-align: center;
  color: #7f8c8d;
  font-size: 13px;
}

.dark-mode .autocomplete-dropdown {
  background: #2c2c2c;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dark-mode .autocomplete-item:hover,
.dark-mode .autocomplete-item.highlighted {
  background: #3a3a3a;
}

.dark-mode .autocomplete-item-name {
  color: #ecf0f1;
}

.dark-mode .autocomplete-item-address {
  color: #95a5a6;
}

/* Autocomplete Section Headers */
.autocomplete-section-header {
  padding: 8px 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7f8c8d;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 6px;
}

.autocomplete-section-header i {
  font-size: 12px;
}

.autocomplete-section-header i.fa-bolt {
  color: #f39c12;
}

.autocomplete-section-header i.fa-map-marker-alt {
  color: #3498db;
}

.dark-mode .autocomplete-section-header {
  background: #252525;
  color: #95a5a6;
  border-bottom-color: #3a3a3a;
}

/* Address autocomplete item icon */
.autocomplete-item-icon.address-icon {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  font-size: 14px;
}

.autocomplete-item-icon.address-icon i {
  color: white;
}

/* ========================================
   LIST VIEW CONTAINER
   ======================================== */
.list-view-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8f9fa;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1;
  padding-top: 0; /* Toolbar handles spacing now */
}

@media (max-width: 768px) {
  .list-view-container {
    padding-top: 0;
  }

  .list-view-header {
    padding: 12px 16px;
    font-size: 13px;
  }

  .list-view-content {
    padding: 12px;
    gap: 10px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
}

.list-view-header {
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
  font-size: 14px;
  font-weight: 600;
  color: #7f8c8d;
}

.list-view-content {
  padding: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.dark-mode .list-view-container {
  background: #1a1a1a;
}

.dark-mode .list-view-header {
  background: #2c2c2c;
  border-bottom-color: #3a3a3a;
  color: #95a5a6;
}

/* ========================================
   LOCATION CARD
   ======================================== */
.location-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.location-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.location-card:active {
  transform: translateY(0);
}

.location-card-content {
  padding: 16px;
}

.location-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.location-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.location-card-info {
  flex: 1;
  min-width: 0;
}

.location-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-card-username {
  font-size: 12px;
  color: #f39c12;
  font-weight: 600;
}

.location-card-address {
  font-size: 12px;
  color: #7f8c8d;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.location-card-address i {
  margin-right: 6px;
  color: #bdc3c7;
}

.location-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.location-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #f39c12;
  font-weight: 600;
}

.location-card-rating i {
  font-size: 12px;
}

.location-card-rating .review-count {
  color: #95a5a6;
  font-weight: 400;
  font-size: 11px;
}

.location-card-badges {
  display: flex;
  gap: 6px;
}

.card-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.card-badge.flash-payment {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
}

.card-badge.cash-service {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.card-badge.loyalty-rewards {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.location-card-distance {
  font-size: 11px;
  color: #95a5a6;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dark-mode .location-card {
  background: #2c2c2c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .location-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dark-mode .location-card-title {
  color: #ecf0f1;
}

.dark-mode .location-card-address {
  color: #95a5a6;
}

.dark-mode .location-card-address i {
  color: #7f8c8d;
}

.dark-mode .card-badge.flash-payment {
  background: rgba(243, 156, 18, 0.2);
}

.dark-mode .card-badge.cash-service {
  background: rgba(52, 152, 219, 0.2);
}

.dark-mode .card-badge.loyalty-rewards {
  background: rgba(231, 76, 60, 0.2);
}

/* ========================================
   LIST VIEW RESPONSIVE
   ======================================== */
@media (max-width: 599px) {
  .list-view-content {
    grid-template-columns: 1fr;
  }

  .location-card-content {
    padding: 14px;
  }

  .location-card-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .location-card-title {
    font-size: 14px;
  }

  .location-card-address {
    font-size: 11px;
  }
}

@media (min-width: 600px) {
  .list-view-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .list-view-content {
    grid-template-columns: repeat(3, 1fr);
    padding: 20px;
    gap: 16px;
  }
}

@media (min-width: 1400px) {
  .list-view-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   SEARCH OVERLAY ADJUSTMENTS FOR NEW COMPONENTS
   ======================================== */
@media (max-width: 600px) {
  .sort-container {
    display: none;
  }

  .category-chips-container {
    padding: 8px 0;
    gap: 6px;
  }

  .category-chip {
    padding: 6px 10px;
    font-size: 11px;
  }

  .view-toggle-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .view-toggle-btn span {
    display: none;
  }

  .list-view-container {
    padding-top: 280px;
  }
}

@media (max-width: 400px) {
  .category-chip span {
    display: none;
  }

  .category-chip i {
    font-size: 14px;
  }

  .category-chip {
    padding: 8px 12px;
  }
}

/* Sort dropdown in mobile menu */
@media (max-width: 600px) {
  .search-bar-container {
    flex-wrap: wrap;
  }

  .sort-container.mobile-sort {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }

  .sort-container.mobile-sort .sort-select {
    width: 100%;
  }
}

/* ========================================
   ADDITIONAL MOBILE IMPROVEMENTS
   ======================================== */

/* Autocomplete dropdown mobile improvements */
@media (max-width: 480px) {
  .autocomplete-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    max-height: 60dvh;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }

  .autocomplete-list {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .autocomplete-item {
    padding: 14px 12px;
    gap: 10px;
  }

  .autocomplete-item-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .autocomplete-item-name {
    font-size: 15px;
  }

  .autocomplete-item-address {
    font-size: 13px;
  }
}

/* Loading spinner improvements for mobile */
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 24px;
}

.dark-mode .loading-spinner {
  background: rgba(30, 30, 30, 0.9);
}

/* Touch-friendly minimum sizes for all interactive elements */
@media (pointer: coarse) {
  .toolbar-btn,
  .view-toggle-btn,
  .category-chip,
  .toolbar-back-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .toolbar-search .search-input {
    min-height: 44px;
  }

  .filter-option {
    min-height: 48px;
  }
}

/* Prevent iOS zoom on input focus */
@media (max-width: 768px) {
  .search-input,
  .toolbar-search .search-input,
  textarea,
  input[type="text"],
  select {
    font-size: 16px !important;
  }
}

/* Smooth scrolling for scrollable containers */
.side-panel,
.list-view-container,
.autocomplete-dropdown,
.nostr-chat-messages {
  scroll-behavior: smooth;
}

/* Improve focus states for accessibility */
.toolbar-btn:focus-visible,
.view-toggle-btn:focus-visible,
.category-chip:focus-visible,
.toolbar-back-btn:focus-visible {
  outline: 2px solid #f39c12;
  outline-offset: 2px;
}

/* Success modal mobile improvements */
@media (max-width: 480px) {
  .success-modal {
    padding: 20px !important;
  }

  .success-modal h2 {
    font-size: 18px !important;
  }

  .success-modal .filter-btn {
    padding: 14px 16px !important;
    font-size: 14px !important;
    min-height: 48px;
  }
}
