/**
 * OAE Alle Orte 2 - Lost Places Theme CSS
 * 
 * Dark, atmospheric styling for abandoned places listing
 * Features: Vintage colors, distressed textures, gothic typography
 * 
 * @package OAE_Alle_Orte2
 * @version 1.0.0
 */

/* ===== CSS CUSTOM PROPERTIES (Variables) ===== */
.lost-places-theme {
  /* Colors */
  --lp-bg-primary: #1a1a1a;
  --lp-bg-secondary: #2d2d2d;
  --lp-bg-tertiary: #3a3a3a;
  --lp-bg-card: #252525;
  --lp-bg-overlay: rgba(0, 0, 0, 0.8);
  
  --lp-text-primary: #e0e0e0;
  --lp-text-secondary: #b8b8b8;
  --lp-text-muted: #888888;
  --lp-text-accent: #d4af37; /* Old gold */
  
  --lp-border-primary: #444444;
  --lp-border-accent: #d4af37;
  --lp-border-danger: #8b0000; /* Dark red */
  
  --lp-accent-primary: #d4af37; /* Old gold */
  --lp-accent-hover: #f4c842;
  --lp-accent-dark: #b8941f;
  --lp-accent-rust: #b7410e; /* Rust color */
  --lp-accent-blood: #8b0000; /* Dark red */
  
  /* Shadows */
  --lp-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --lp-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
  --lp-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.6);
  --lp-shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  
  /* Transitions */
  --lp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --lp-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Typography */
  --lp-font-primary: 'Georgia', 'Times New Roman', serif;
  --lp-font-secondary: 'Arial', 'Helvetica', sans-serif;
  --lp-font-mono: 'Courier New', monospace;
}

/* ===== BASE STYLES ===== */
.oae-alle-orte2-wrapper.lost-places-theme {
  background: var(--lp-bg-primary);
  color: var(--lp-text-primary);
  font-family: var(--lp-font-primary);
  padding: 1rem; /* Smaller padding on mobile */
  border-radius: 8px;
  box-shadow: var(--lp-shadow-lg);
  position: relative;
  overflow: hidden;
  /* Mobile-first responsive design */
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important; /* No min-width on mobile */
}

/* Desktop width constraints only on larger screens */
@media (min-width: 768px) {
  .oae-alle-orte2-wrapper.lost-places-theme {
    padding: 2rem;
    min-width: 1400px !important;
  }
}

.oae-alle-orte2-wrapper.lost-places-theme::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, transparent 48%, rgba(212, 175, 55, 0.05) 49%, rgba(212, 175, 55, 0.05) 51%, transparent 52%),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  z-index: 1;
}

.oae-alle-orte2-wrapper.lost-places-theme > * {
  position: relative;
  z-index: 2;
}

/* ===== FILTER FORM STYLES ===== */
.oae-filter-form {
  background: var(--lp-bg-secondary);
  border: 2px solid var(--lp-border-primary);
  border-radius: 12px;
  padding: 1.5rem; /* Mobile-friendly padding */
  margin-bottom: 2rem;
  box-shadow: var(--lp-shadow-lg);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* No min-width on mobile */
  max-width: none;
}

/* Desktop filter form sizing */
@media (min-width: 768px) {
  .oae-filter-form {
    padding: 2.5rem;
    min-width: 1400px;
  }
}

.oae-filter-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lp-accent-primary), var(--lp-accent-rust), var(--lp-accent-primary));
  opacity: 0.8;
}


.filter-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
}

/* Desktop: Grid layout only on desktop */
@media (min-width: 768px) {
  .filter-row {
    /* Change to grid layout only on desktop */
    display: grid !important;
    grid-template-columns: 1.8fr 1.3fr 1.3fr;
    grid-template-rows: auto auto;
    gap: 1.2rem 1.5rem;
    align-items: end;
    
    /* Grid area assignments */
    grid-template-areas: 
      "search kategorie unterkategorie"
      "region unterregion actions";
  }
  
  /* Assign grid areas to specific elements only on desktop */
  .search-group {
    grid-area: search;
  }
  
  .kategorie-group {
    grid-area: kategorie;
  }
  
  .unterkategorie-group {
    grid-area: unterkategorie;
  }
  
  .region-group {
    grid-area: region;
  }
  
  .unterregion-group {
    grid-area: unterregion;
  }
  
  .filter-actions {
    grid-area: actions;
    align-self: end;
  }
}

@media (min-width: 1200px) {
  .filter-row {
    /* Better proportions for bigger screens */
    grid-template-columns: 2fr 1.4fr 1.4fr;
    gap: 1.5rem 2rem;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0; /* Prevent overflow */
  width: 100%; /* Ensure full width usage */
}

/* Force ALL filter groups to be visible on desktop */
@media (min-width: 768px) {
  .filter-group,
  .unterkategorie-group,
  .unterregion-group,
  .region-group,
  .kategorie-group,
  .search-group {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Ensure ALL select elements are visible and not cut off */
  #oae-kategorie,
  #oae-unterkategorie,
  #oae-region,
  #oae-unterregion {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 180px !important;
    box-sizing: border-box !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  
  #oae-search {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

.filter-group label {
  font-weight: bold;
  color: var(--lp-text-accent) !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  margin-bottom: 0.5rem;
  display: block;
  background-color: rgba(0, 0, 0, 0.3) !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 4px !important;
  z-index: 10 !important;
  position: relative !important;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ===== INPUT STYLES ===== */
.search-input,
.filter-select {
  background: var(--lp-bg-primary);
  border: 2px solid var(--lp-border-primary);
  color: var(--lp-text-primary);
  padding: 1rem; /* Larger touch targets on mobile */
  border-radius: 8px; /* Slightly rounded for mobile */
  font-family: var(--lp-font-primary);
  font-size: 1rem; /* Larger font for mobile readability */
  transition: var(--lp-transition);
  box-shadow: var(--lp-shadow-inset);
  width: 100%;
  min-height: 48px; /* Larger touch target */
  max-width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none; /* Remove iOS styling */
  -moz-appearance: none; /* Remove Firefox styling */
  appearance: none;
}

/* Desktop input sizing */
@media (min-width: 768px) {
  .search-input,
  .filter-select {
    padding: 0.75rem;
    font-size: 0.95rem;
    min-height: 44px;
    border-radius: 6px;
  }
}

/* Ensure subcategory and subregion selects are always enabled on desktop */
@media (min-width: 768px) {
  #oae-unterkategorie,
  #oae-unterregion {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .filter-select {
    min-width: 120px; /* Reduced minimum width to fit better */
    max-width: 100%; /* Prevent overflow */
    font-size: 0.9rem; /* Slightly smaller font for better fit */
  }
  
  /* Make labels more compact */
  .filter-group label {
    font-size: 0.8rem !important;
    padding: 0.2rem 0.4rem !important;
  }
  
  /* Specific constraints for region fields that were overflowing */
  .region-group,
  .unterregion-group {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  #oae-region,
  #oae-unterregion {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.search-input {
  font-size: 1rem;
}

.search-input::placeholder {
  color: var(--lp-text-muted);
  font-style: italic;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--lp-accent-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
  background: var(--lp-bg-tertiary);
}

.filter-select:hover {
  border-color: var(--lp-accent-hover);
  cursor: pointer;
}

/* ===== AUTOCOMPLETE STYLES ===== */
.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--lp-bg-secondary);
  border: 2px solid var(--lp-border-primary);
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: var(--lp-shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-autocomplete.active {
  display: block;
}

.autocomplete-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  color: var(--lp-text-primary);
  cursor: pointer;
  transition: var(--lp-transition);
  border-bottom: 1px solid var(--lp-border-primary);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--lp-accent-primary);
  color: var(--lp-bg-primary);
}

.autocomplete-item::before {
  content: '🔍';
  margin-right: 0.5rem;
  opacity: 0.7;
}

/* ===== BUTTON STYLES ===== */
.filter-submit,
.filter-reset,
.layout-btn,
.geo-location-btn {
  background: linear-gradient(135deg, var(--lp-accent-primary) 0%, var(--lp-accent-dark) 100%);
  border: 2px solid var(--lp-accent-primary);
  color: var(--lp-bg-primary);
  padding: 1rem 1.5rem; /* Larger touch targets */
  border-radius: 8px;
  font-family: var(--lp-font-primary);
  font-weight: bold;
  font-size: 1rem; /* Larger font on mobile */
  text-decoration: none;
  cursor: pointer;
  transition: var(--lp-transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--lp-shadow-sm);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-height: 48px; /* Larger touch target */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* Full width on mobile */
}

/* Desktop button sizing */
@media (min-width: 768px) {
  .filter-submit,
  .filter-reset,
  .layout-btn,
  .geo-location-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-height: 44px;
    border-radius: 6px;
    width: auto; /* Auto width on desktop */
  }
}

.filter-submit::before,
.filter-reset::before,
.layout-btn::before,
.geo-location-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;
}

.filter-submit:hover,
.filter-reset:hover,
.layout-btn:hover,
.geo-location-btn:hover {
  background: linear-gradient(135deg, var(--lp-accent-hover) 0%, var(--lp-accent-primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow-md);
}

.filter-submit:hover::before,
.filter-reset:hover::before,
.layout-btn:hover::before,
.geo-location-btn:hover::before {
  left: 100%;
}

.filter-reset {
  background: linear-gradient(135deg, var(--lp-accent-rust) 0%, var(--lp-accent-blood) 100%);
  border-color: var(--lp-accent-rust);
}

.filter-reset:hover {
  background: linear-gradient(135deg, #d4531f 0%, var(--lp-accent-rust) 100%);
}

.geo-location-btn {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  border-color: #2196F3;
}

.geo-location-btn:hover {
  background: linear-gradient(135deg, #42A5F5 0%, #2196F3 100%);
}

.geo-location-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.geo-location-btn:disabled:hover {
  transform: none;
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.geo-icon {
  font-size: 1.1em;
  margin-right: 0.5rem;
}

.filter-actions {
  display: flex;
  flex-direction: column; /* Stack buttons on mobile */
  gap: 1rem;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

/* Desktop filter actions - horizontal layout */
@media (min-width: 768px) {
  .filter-actions {
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    width: auto;
  }
}

@media (min-width: 768px) {
  .filter-actions {
    justify-content: flex-end;
  }
}

/* ===== RESULTS HEADER ===== */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 2px solid var(--lp-border-primary);
}

.results-count {
  color: var(--lp-text-secondary);
  font-style: italic;
}

.layout-toggle {
  display: flex;
  gap: 0.5rem;
}

.layout-btn {
  padding: 0.5rem;
  min-width: 2.5rem;
  background: var(--lp-bg-secondary);
  border-color: var(--lp-border-primary);
  color: var(--lp-text-secondary);
}

.layout-btn.active {
  background: linear-gradient(135deg, var(--lp-accent-primary) 0%, var(--lp-accent-dark) 100%);
  color: var(--lp-bg-primary);
  border-color: var(--lp-accent-primary);
}

.grid-icon::before {
  content: '⊞';
  font-size: 1.2rem;
}

.list-icon::before {
  content: '☰';
  font-size: 1.2rem;
}

/* ===== RESULTS GRID/LIST ===== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.results-list .place-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.results-list .place-thumbnail {
  flex-shrink: 0;
  width: 150px;
}

.results-list .place-content {
  flex: 1;
}

/* ===== PLACE CARD STYLES ===== */
.place-card {
  background: var(--lp-bg-card);
  border: 2px solid var(--lp-border-primary);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--lp-transition);
  box-shadow: var(--lp-shadow-sm);
  position: relative;
}

.place-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lp-accent-primary), var(--lp-accent-rust), var(--lp-accent-primary));
  opacity: 0;
  transition: var(--lp-transition);
}

.place-card:hover {
  border-color: var(--lp-accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--lp-shadow-lg);
}

.place-card:hover::before {
  opacity: 1;
}

.place-thumbnail {
  position: relative;
  overflow: hidden;
}

.place-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--lp-transition-slow);
  filter: grayscale(30%) sepia(20%);
}

.place-card:hover .place-thumbnail img {
  transform: scale(1.05);
  filter: grayscale(0%) sepia(0%);
}

.place-thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--lp-bg-overlay);
  opacity: 0;
  transition: var(--lp-transition);
}

.place-card:hover .place-thumbnail::after {
  opacity: 0.2;
}

/* ===== PLACE CONTENT ===== */
.place-content {
  padding: 1.5rem;
}

.place-title {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.place-title a {
  color: var(--lp-text-accent);
  text-decoration: none;
  transition: var(--lp-transition);
  position: relative;
}

.place-title a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--lp-accent-primary);
  transition: var(--lp-transition);
}

.place-title a:hover {
  color: var(--lp-accent-hover);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.place-title a:hover::after {
  width: 100%;
}

.place-distance {
  display: inline-block;
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  margin-left: 1rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
  border: 1px solid #1976D2;
  position: relative;
  overflow: hidden;
}

.place-distance::before {
  content: '📏';
  margin-right: 0.4rem;
  opacity: 0.9;
}

.place-distance::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: distanceShimmer 2s infinite;
}

@keyframes distanceShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ===== GEOLOCATION DETECTION SCREEN ===== */
.geolocation-detection {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: 2rem;
}

.detection-card {
  text-align: center;
  background: var(--lp-bg-secondary);
  border: 2px solid var(--lp-border-primary);
  border-radius: 12px;
  padding: 3rem 2rem;
  max-width: 500px;
  box-shadow: var(--lp-shadow-lg);
  position: relative;
  overflow: hidden;
}

.detection-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 48%, rgba(212, 175, 55, 0.05) 49%, rgba(212, 175, 55, 0.05) 51%, transparent 52%);
  pointer-events: none;
}

.detection-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.detection-title {
  color: var(--lp-text-accent);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.detection-message {
  color: var(--lp-text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-style: italic;
}

.manual-location-btn {
  background: linear-gradient(135deg, var(--lp-accent-rust) 0%, var(--lp-accent-blood) 100%);
  border: 2px solid var(--lp-accent-rust);
  color: var(--lp-text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-family: var(--lp-font-primary);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--lp-transition);
  position: relative;
  z-index: 2;
}

.manual-location-btn:hover {
  background: linear-gradient(135deg, #d4531f 0%, var(--lp-accent-rust) 100%);
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow-md);
}

/* ===== PLACE ACTION BUTTONS ===== */
.place-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.place-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(45, 45, 45, 0.3);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  color: rgba(224, 224, 224, 0.6);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--lp-transition);
  font-family: var(--lp-font-primary);
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 10;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  overflow: hidden;
  opacity: 0.7;
}

.place-btn:hover:not(.active):not([aria-pressed="true"]) {
  background: var(--lp-bg-tertiary);
  border-color: var(--lp-accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--lp-shadow-md);
}

.place-btn:active {
  transform: translateY(0);
}

/* Button icons */
.btn-icon {
  font-size: 1.1em;
  transition: var(--lp-transition);
}

/* Favorite button states */
.place-fav {
  border: 2px dashed rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: rgba(245, 158, 11, 0.6);
}

.place-fav:hover:not(.active):not([aria-pressed="true"]) {
  background: rgba(245, 158, 11, 0.8) !important;
  color: #1a1a1a !important;
  border: 2px solid #f59e0b !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
  opacity: 1 !important;
}

.place-fav.active,
.place-fav.is-active,
.place-fav[aria-pressed="true"] {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #1a1a1a !important;
  border: 3px solid #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  transition: none !important;
  opacity: 1 !important;
  font-weight: 900 !important;
}

.place-fav.active:hover,
.place-fav.is-active:hover,
.place-fav[aria-pressed="true"]:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: var(--lp-bg-primary) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
  transform: none !important;
  transition: none !important;
}

.place-fav.active .btn-icon,
.place-fav.is-active .btn-icon,
.place-fav[aria-pressed="true"] .btn-icon {
  transform: scale(1.5) !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 1)) drop-shadow(0 0 16px rgba(245, 158, 11, 0.5)) !important;
  transition: none !important;
  animation: iconPulse 2s ease-in-out infinite !important;
}

/* Visited button states */
.place-visited {
  border: 2px dashed rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: rgba(16, 185, 129, 0.6);
}

.place-visited:hover:not(.active):not([aria-pressed="true"]) {
  background: rgba(16, 185, 129, 0.8) !important;
  color: #ffffff !important;
  border: 2px solid #10b981 !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
  opacity: 1 !important;
}

.place-visited.active,
.place-visited.is-active,
.place-visited[aria-pressed="true"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 3px solid #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  opacity: 1 !important;
  font-weight: 900 !important;
}

.place-visited.active .btn-icon,
.place-visited.is-active .btn-icon,
.place-visited[aria-pressed="true"] .btn-icon {
  transform: scale(1.5) !important;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 1)) drop-shadow(0 0 16px rgba(16, 185, 129, 0.5)) !important;
  animation: iconPulse 2s ease-in-out infinite !important;
}

/* Button animations */
.place-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;
}

.place-btn:hover:not(.active):not([aria-pressed="true"])::before {
  left: 100%;
}

/* Feedback message positioning */
.place-card {
  position: relative;
}

.feedback-message {
  position: absolute;
  z-index: 1001;
  animation: feedbackPulse 0.3s ease-in-out;
}

@keyframes feedbackPulse {
  0% { transform: translateX(-50%) scale(0.8); opacity: 0; }
  50% { transform: translateX(-50%) scale(1.1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1.5) rotate(0deg); }
  50% { transform: scale(1.7) rotate(5deg); }
}

.place-excerpt {
  color: var(--lp-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
  font-style: italic;
}

/* ===== TERM BADGES ===== */
.place-terms {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.term-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.term-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  transition: var(--lp-transition);
  position: relative;
  overflow: hidden;
}

.kategorie-badge {
  background: linear-gradient(135deg, var(--lp-accent-rust) 0%, var(--lp-accent-blood) 100%);
  color: var(--lp-text-primary);
  border: 1px solid var(--lp-accent-rust);
}

.region-badge {
  background: linear-gradient(135deg, var(--lp-accent-dark) 0%, var(--lp-accent-primary) 100%);
  color: var(--lp-bg-primary);
  border: 1px solid var(--lp-accent-primary);
}

.term-badge::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;
}

.term-badge:hover::before {
  left: 100%;
}

/* ===== NO RESULTS STYLES ===== */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--lp-text-secondary);
  background: var(--lp-bg-secondary);
  border: 2px dashed var(--lp-border-primary);
  border-radius: 8px;
  position: relative;
}

.no-results::before {
  content: '☠';
  font-size: 4rem;
  color: var(--lp-accent-primary);
  display: block;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results h3 {
  color: var(--lp-text-accent);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* ===== PAGINATION STYLES ===== */
.oae-pagination {
  margin-top: 3rem;
}

.pagination-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination-item {
  margin: 0;
}

.pagination-link {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--lp-bg-secondary);
  border: 2px solid var(--lp-border-primary);
  color: var(--lp-text-primary);
  text-decoration: none;
  border-radius: 4px;
  transition: var(--lp-transition);
  font-family: var(--lp-font-primary);
  font-weight: bold;
  min-width: 2.5rem;
  text-align: center;
}

.pagination-link:hover {
  background: var(--lp-accent-primary);
  color: var(--lp-bg-primary);
  border-color: var(--lp-accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow-sm);
}

.pagination-item.current .pagination-link {
  background: linear-gradient(135deg, var(--lp-accent-primary) 0%, var(--lp-accent-dark) 100%);
  color: var(--lp-bg-primary);
  border-color: var(--lp-accent-primary);
  cursor: default;
}

.pagination-item.current .pagination-link:hover {
  transform: none;
}

/* ===== LOADING STATES ===== */
.oae-results-container[aria-busy="true"] {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.oae-results-container[aria-busy="true"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid var(--lp-border-primary);
  border-top: 4px solid var(--lp-accent-primary);
  border-radius: 50%;
  animation: lp-spin 1s linear infinite;
}

@keyframes lp-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Focus indicators */
button:focus,
select:focus,
input:focus,
a:focus {
  outline: 3px solid var(--lp-accent-primary);
  outline-offset: 2px;
}

/* ===== ENHANCED MOBILE FILTER DESIGN ===== */
/* Optimized mobile layout with better touch targets and spacing */
@media (max-width: 767px) {
  /* Enhanced mobile container */
  .oae-alle-orte2-wrapper,
  .oae-alle-orte2-wrapper.lost-places-theme {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0.75rem !important; /* Reduced padding for more space */
  }
  
  /* Enhanced mobile filter form */
  .oae-filter-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 1.25rem !important; /* Better mobile padding */
    margin-bottom: 1.5rem !important;
    border-radius: 12px !important; /* Larger radius for modern mobile look */
  }
  
  /* Enhanced vertical filter layout */
  .filter-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important; /* Increased gap for better separation */
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }
  
  /* Enhanced mobile filter groups */
  .search-group,
  .kategorie-group,
  .unterkategorie-group,
  .region-group,
  .unterregion-group,
  .filter-actions {
    grid-area: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
  }
  
  /* Enhanced mobile filter labels */
  .filter-group label {
    font-size: 0.9rem !important; /* Larger text for mobile readability */
    margin-bottom: 0.75rem !important; /* More space between label and input */
    padding: 0.5rem 0.75rem !important; /* Better touch-friendly padding */
    border-radius: 6px !important; /* Rounded corners for modern look */
    display: block !important;
  }
  
  /* Enhanced mobile inputs and selects */
  .search-input,
  .filter-select {
    padding: 1.25rem !important; /* Larger touch targets */
    font-size: 1.1rem !important; /* Better readability on small screens */
    min-height: 54px !important; /* Larger touch target (iOS recommendation) */
    border-radius: 10px !important; /* Modern mobile border radius */
    border-width: 2px !important; /* Slightly thicker borders for visibility */
    box-shadow: var(--lp-shadow-sm), inset 0 1px 3px rgba(0,0,0,0.1) !important;
  }
  
  /* Enhanced mobile search input */
  .search-input {
    font-size: 1.1rem !important;
    padding: 1.25rem 1.5rem !important; /* Extra padding for search */
  }
  
  /* Enhanced mobile select styling */
  .filter-select {
    cursor: pointer !important;
    background-image: linear-gradient(45deg, transparent 50%, var(--lp-text-primary) 50%), 
                      linear-gradient(135deg, var(--lp-text-primary) 50%, transparent 50%) !important;
    background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px) !important;
    background-size: 5px 5px, 5px 5px !important;
    background-repeat: no-repeat !important;
    padding-right: 3rem !important; /* Space for custom arrow */
  }
  
  /* Enhanced mobile button container */
  .filter-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important; /* Consistent gap */
    margin-top: 1.5rem !important; /* Separation from inputs */
    padding-top: 1.5rem !important;
    border-top: 2px solid var(--lp-border-primary) !important; /* Visual separation */
  }
  
  /* Enhanced mobile buttons */
  .filter-submit,
  .filter-reset,
  .geo-location-btn {
    width: 100% !important;
    padding: 1.5rem !important; /* Large touch targets */
    font-size: 1.1rem !important; /* Bigger text */
    min-height: 56px !important; /* iOS recommended touch target */
    border-radius: 12px !important; /* Modern mobile radius */
    font-weight: 600 !important; /* Slightly bolder for mobile */
    letter-spacing: 0.25px !important; /* Better readability */
    box-shadow: var(--lp-shadow-md) !important;
    transition: all 0.2s ease !important; /* Faster transitions on mobile */
  }
  
  /* Enhanced mobile search container */
  .search-container {
    position: relative !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* Enhanced mobile autocomplete */
  .search-autocomplete {
    border-radius: 0 0 12px 12px !important;
    max-height: 250px !important; /* Larger on mobile for easier selection */
    box-shadow: var(--lp-shadow-lg) !important;
  }
  
  .autocomplete-item {
    padding: 1rem 1.25rem !important; /* Larger touch targets */
    font-size: 1rem !important;
    border-bottom: 1px solid var(--lp-border-primary) !important;
  }
  
  /* Enhanced mobile focus states */
  .search-input:focus,
  .filter-select:focus {
    outline: 3px solid var(--lp-accent-primary) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
    transform: scale(1.02) !important; /* Subtle scale for feedback */
  }
  
  /* Enhanced mobile button hover/active states */
  .filter-submit:active,
  .filter-reset:active,
  .geo-location-btn:active {
    transform: scale(0.98) !important; /* Press feedback */
    transition: transform 0.1s ease !important;
  }
  
  /* Mobile-specific select arrow positioning */
  .filter-select::-webkit-appearance {
    -webkit-appearance: none !important;
  }
  
  .filter-select::-moz-appearance {
    -moz-appearance: none !important;
  }
  
  /* Ensure mobile selects are properly styled */
  .filter-select option {
    padding: 0.75rem !important;
    font-size: 1rem !important;
    background: var(--lp-bg-secondary) !important;
    color: var(--lp-text-primary) !important;
  }
  
  /* Mobile keyboard support */
  .search-input[data-mobile-focused="true"],
  .filter-select[data-mobile-focused="true"] {
    position: relative !important;
    z-index: 1000 !important;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .oae-alle-orte2-wrapper.lost-places-theme {
    padding: 1rem;
  }
  
  .oae-filter-form {
    padding: 1.5rem 1rem;
  }
  
  .filter-row {
    gap: 1rem;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .results-list .place-card {
    flex-direction: column;
  }
  
  .results-list .place-thumbnail {
    width: 100%;
  }
  
  .results-header {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ===== EXTRA SMALL MOBILE DEVICES ===== */
@media (max-width: 480px) {
  /* Ultra-compact wrapper for small screens */
  .oae-alle-orte2-wrapper,
  .oae-alle-orte2-wrapper.lost-places-theme {
    padding: 0.5rem !important; /* Minimal padding on very small screens */
  }
  
  .oae-filter-form {
    padding: 1rem !important; /* Compact form padding */
    margin-bottom: 1rem !important;
  }
  
  /* Compact filter row spacing */
  .filter-row {
    gap: 1rem !important;
  }
  
  /* Compact filter labels */
  .filter-group label {
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem !important;
    padding: 0.4rem 0.6rem !important;
  }
  
  /* Compact inputs for small screens */
  .search-input,
  .filter-select {
    padding: 1rem !important;
    font-size: 1rem !important;
    min-height: 48px !important; /* Minimum viable touch target */
  }
  
  /* Compact button actions */
  .filter-actions {
    flex-direction: column !important;
    margin-top: 1rem !important;
    padding-top: 1rem !important;
  }
  
  .filter-submit,
  .filter-reset,
  .geo-location-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 1.25rem !important;
    font-size: 1rem !important;
    min-height: 50px !important;
  }
  
  /* Results adjustments for small screens */
  .place-distance {
    display: block !important;
    margin-left: 0 !important;
    margin-top: 0.5rem !important;
    text-align: center !important;
    width: fit-content !important;
  }
  
  .place-actions {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .place-btn {
    justify-content: center !important;
    padding: 1rem !important; /* Larger touch target even on small screens */
    min-height: 48px !important;
  }
  
  /* Compact pagination */
  .pagination-list {
    gap: 0.25rem !important;
    justify-content: center !important;
  }
  
  .pagination-link {
    padding: 0.75rem 0.5rem !important;
    font-size: 0.9rem !important;
    min-width: 44px !important; /* Ensure touch target */
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ===== MOBILE LANDSCAPE OPTIMIZATIONS ===== */
@media (max-width: 967px) and (orientation: landscape) {
  /* Adjust for mobile landscape (e.g., phones rotated) */
  .oae-filter-form {
    padding: 1rem 1.5rem !important;
  }
  
  /* Two-column layout for landscape mobile */
  .filter-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    grid-template-areas:
      "search search"
      "kategorie unterkategorie"
      "region unterregion"
      "actions actions" !important;
  }
  
  .search-group { grid-area: search !important; }
  .kategorie-group { grid-area: kategorie !important; }
  .unterkategorie-group { grid-area: unterkategorie !important; }
  .region-group { grid-area: region !important; }
  .unterregion-group { grid-area: unterregion !important; }
  .filter-actions { grid-area: actions !important; }
  
  .filter-actions {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 1rem !important;
  }
  
  .filter-submit,
  .filter-reset,
  .geo-location-btn {
    width: auto !important;
    min-width: 140px !important;
  }
}

/* ===== MOBILE TOUCH IMPROVEMENTS ===== */
@media (max-width: 767px) {
  /* Improve touch interaction */
  .filter-select:focus {
    /* Prevent zoom on iOS */
    font-size: 16px !important;
  }
  
  /* Ensure proper spacing between interactive elements */
  .filter-group + .filter-group {
    margin-top: 1rem !important;
  }
  
  /* Add visual feedback for touch interactions */
  .filter-submit:active,
  .filter-reset:active {
    background: var(--lp-accent-dark) !important;
  }
  
  /* Improve readability of placeholders on mobile */
  .search-input::placeholder {
    font-size: 1rem !important;
    color: var(--lp-text-muted) !important;
    opacity: 0.8 !important;
  }
}

/* ===== MOBILE ACCESSIBILITY IMPROVEMENTS ===== */
@media (max-width: 767px) {
  /* Larger tap targets for accessibility */
  .filter-submit,
  .filter-reset,
  .geo-location-btn,
  .search-input,
  .filter-select {
    min-height: 44px !important; /* WCAG AA minimum */
  }
  
  /* Enhanced focus indicators for mobile */
  button:focus,
  select:focus,
  input:focus {
    outline: 3px solid var(--lp-accent-primary) !important;
    outline-offset: 2px !important;
  }
  
  /* Ensure sufficient color contrast for labels */
  .filter-group label {
    color: var(--lp-text-accent) !important;
    font-weight: 600 !important;
  }
}

/* ===== MOBILE-FIRST OVERRIDES ===== */
/* Mobile: No width constraints at all */
.oae-alle-orte2-wrapper,
.oae-alle-orte2-wrapper.lost-places-theme,
div[class*="oae-alle-orte2"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Desktop: Force wider layout only on desktop */
@media (min-width: 768px) {
  .oae-alle-orte2-wrapper,
  .oae-alle-orte2-wrapper.lost-places-theme,
  div[class*="oae-alle-orte2"] {
    min-width: 1400px !important;
  }
}

/* Override any parent container restrictions */
.oae-alle-orte2-wrapper * {
  box-sizing: border-box !important;
}

/* Mobile: Force filter form to be responsive */
.oae-alle-orte2-wrapper .oae-filter-form {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* Desktop: Allow wider filter form */
@media (min-width: 768px) {
  .oae-alle-orte2-wrapper .oae-filter-form {
    min-width: 1400px !important;
    max-width: none !important;
    overflow: visible !important;
  }
}

/* Ensure the filter row uses proper grid layout */
.oae-alle-orte2-wrapper .filter-row {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
}

/* Override any theme restrictions on select widths */
.oae-alle-orte2-wrapper select,
.oae-alle-orte2-wrapper input[type="text"],
.oae-alle-orte2-wrapper .filter-select {
  max-width: none !important;
  width: 100% !important;
}

/* ===== EMERGENCY MOBILE FIXES ===== */
/* Ultra-strong mobile rules that override everything */
@media screen and (max-width: 767px) {
  /* Force mobile container - ultra strong selectors */
  html body .oae-alle-orte2-wrapper,
  html body .oae-alle-orte2-wrapper.lost-places-theme,
  html body div.oae-alle-orte2-wrapper,
  body .oae-alle-orte2-wrapper,
  .oae-alle-orte2-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    display: block !important;
  }
  
  /* Force mobile filter form */
  html body .oae-filter-form,
  body .oae-filter-form,
  .oae-filter-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 1.5rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    display: block !important;
  }
  
  /* FORCE VERTICAL LAYOUT - Maximum strength */
  html body .filter-row,
  body .filter-row,
  .oae-filter-form .filter-row,
  .filter-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    /* DESTROY GRID LAYOUT */
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    grid-template-rows: none !important;
    grid: none !important;
  }
  
  /* Force all filter groups to full width and visible */
  html body .filter-group,
  body .filter-group,
  .filter-row .filter-group,
  .filter-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    /* Remove grid positioning */
    grid-area: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  
  /* Force all inputs to full width */
  html body .filter-select,
  html body .search-input,
  body .filter-select,
  body .search-input,
  .filter-select,
  .search-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
  }
  
  /* Force action buttons to stack vertically */
  html body .filter-actions,
  body .filter-actions,
  .filter-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-area: auto !important;
  }
  
  /* Force buttons to full width */
  html body .filter-submit,
  html body .filter-reset,
  body .filter-submit,
  body .filter-reset,
  .filter-submit,
  .filter-reset {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
  }
}

/* ===== MOBILE BREAKPOINT VERIFICATION ===== */
/* These rules ensure proper display at all common mobile screen sizes */

/* iPhone SE (320px) */
@media (max-width: 320px) {
  .oae-alle-orte2-wrapper {
    padding: 0.25rem !important;
  }
  
  .oae-filter-form {
    padding: 0.75rem !important;
  }
  
  .search-input,
  .filter-select {
    font-size: 0.95rem !important;
    padding: 1rem 0.75rem !important;
  }
  
  .filter-submit,
  .filter-reset,
  .geo-location-btn {
    font-size: 0.95rem !important;
    padding: 1.25rem 1rem !important;
  }
}

/* iPhone 12 Mini (375px) */
@media (min-width: 321px) and (max-width: 375px) {
  .search-input,
  .filter-select {
    font-size: 1rem !important;
  }
}

/* iPhone 12/13/14 (390px) and iPhone 14 Pro (393px) */
@media (min-width: 376px) and (max-width: 414px) {
  /* Standard mobile sizing - already handled by main mobile rules */
}

/* Large mobile phones (415px - 480px) */
@media (min-width: 415px) and (max-width: 480px) {
  .filter-row {
    gap: 1.5rem !important;
  }
  
  .oae-filter-form {
    padding: 1.5rem !important;
  }
}

/* Tablet Portrait (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .filter-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    grid-template-areas:
      "search search"
      "kategorie unterkategorie"
      "region unterregion"
      "actions actions" !important;
  }
  
  .search-group { grid-area: search !important; }
  .kategorie-group { grid-area: kategorie !important; }
  .unterkategorie-group { grid-area: unterkategorie !important; }
  .region-group { grid-area: region !important; }
  .unterregion-group { grid-area: unterregion !important; }
  .filter-actions { grid-area: actions !important; }
  
  .filter-actions {
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 1rem !important;
  }
  
  .filter-submit,
  .filter-reset,
  .geo-location-btn {
    width: auto !important;
    flex: 1 !important;
  }
}

/* ===== DESKTOP PRESERVATION ===== */
/* Ensure desktop design remains completely untouched */
@media (min-width: 768px) {
  /* Explicitly preserve all desktop styles */
  .oae-alle-orte2-wrapper.lost-places-theme {
    min-width: 1400px !important;
    padding: 2rem !important;
  }
  
  .oae-filter-form {
    min-width: 1400px !important;
    padding: 2.5rem !important;
  }
  
  .filter-row {
    display: grid !important;
    grid-template-columns: 1.8fr 1.3fr 1.3fr !important;
    grid-template-rows: auto auto !important;
    gap: 1.2rem 1.5rem !important;
    align-items: end !important;
    grid-template-areas: 
      "search kategorie unterkategorie"
      "region unterregion actions" !important;
  }
  
  .search-input,
  .filter-select {
    padding: 0.75rem !important;
    font-size: 0.95rem !important;
    min-height: 44px !important;
    border-radius: 6px !important;
  }
  
  .filter-submit,
  .filter-reset,
  .geo-location-btn {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.9rem !important;
    min-height: 44px !important;
    border-radius: 6px !important;
    width: auto !important;
  }
  
  .filter-actions {
    flex-direction: row !important;
    gap: 0.75rem !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
  }
}

/* ===== ROUTE BUTTON STYLES ===== */
.oae-route-button-container {
  margin: 1.5rem 0;
  position: relative;
}

.oae-route-button {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 2px solid #2563eb;
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: var(--lp-font-primary, Georgia, serif);
  font-weight: bold;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--lp-transition, all 0.3s ease);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 300px;
}

.oae-route-button::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;
}

.oae-route-button:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
}

.oae-route-button:hover::before {
  left: 100%;
}

.oae-route-button:active {
  transform: translateY(0);
}

/* Route button icons */
.route-icon {
  font-size: 1.2em;
  margin-right: 0.5rem;
}

.route-arrow {
  font-size: 0.8em;
  margin-left: 0.5rem;
  transition: transform 0.3s;
}

/* Dropdown functionality */
.route-button-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
}

.route-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--lp-bg-secondary, #2d2d2d);
  border: 2px solid var(--lp-border-primary, #444444);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.route-button-dropdown.active .route-dropdown-menu,
.route-dropdown-menu:hover,
.route-main-btn:focus + .route-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.route-button-dropdown:hover .route-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.route-button-dropdown.active .route-arrow {
  transform: rotate(180deg);
}

.route-service-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--lp-text-primary, #e0e0e0);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--lp-border-primary, #444444);
}

.route-service-link:last-child {
  border-bottom: none;
}

.route-service-link:hover {
  background: var(--lp-accent-primary, #d4af37);
  color: var(--lp-bg-primary, #1a1a1a);
}

.service-icon {
  font-size: 1.2em;
  flex-shrink: 0;
}

.service-name {
  font-weight: bold;
  font-size: 0.9rem;
}

.service-desc {
  font-size: 0.8rem;
  color: var(--lp-text-secondary, #b8b8b8);
  margin-left: auto;
}

.route-service-link:hover .service-desc {
  color: var(--lp-bg-primary, #1a1a1a);
}

/* Error state */
.oae-route-button-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #ef4444;
  font-size: 0.9rem;
}

.error-icon {
  font-size: 1.2em;
}

/* Size variations */
.size-small .oae-route-button {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  min-height: 40px;
}

.size-large .oae-route-button {
  padding: 1.25rem 2rem;
  font-size: 1.1rem;
  min-height: 56px;
}

/* Style variations */
.style-minimal .oae-route-button {
  background: transparent;
  border: 2px solid #2563eb;
  color: #2563eb;
}

.style-minimal .oae-route-button:hover {
  background: #2563eb;
  color: #ffffff;
}

.style-icon-only .oae-route-button {
  width: 48px;
  max-width: 48px;
  padding: 1rem;
}

.style-icon-only .route-text {
  display: none;
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .oae-route-button-container {
    width: 100%;
    max-width: none;
  }
  
  .oae-route-button,
  .route-button-dropdown {
    width: 100%;
    max-width: none;
  }
  
  .oae-route-button {
    padding: 1.25rem;
    font-size: 1.1rem;
    min-height: 56px;
  }
  
  .route-dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    max-height: 50vh;
    overflow-y: auto;
  }
  
  .route-service-link {
    padding: 1rem;
    font-size: 1rem;
    min-height: 56px;
  }
  
  .service-name {
    font-size: 1rem;
  }
  
  .service-desc {
    font-size: 0.9rem;
  }
}

/* Coordinates info */
.route-coordinates-info {
  text-align: center;
  color: var(--lp-text-muted, #888888);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Auto-added route button */
.auto-route-button {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--lp-bg-secondary, #2d2d2d);
  border-radius: 8px;
  border: 2px solid var(--lp-border-primary, #444444);
  text-align: center;
}

.auto-route-button::before {
  content: 'Navigation';
  display: block;
  font-weight: bold;
  color: var(--lp-text-accent, #d4af37);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .oae-alle-orte2-wrapper.lost-places-theme {
    background: white;
    color: black;
    box-shadow: none;
  }
  
  .oae-filter-form,
  .layout-toggle,
  .pagination-container {
    display: none;
  }
  
  .place-card {
    background: white;
    border: 1px solid #ccc;
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* ===== MODERN THEME OVERRIDES ===== */
/* Apply when wrapper has class 'modern' to match LostUrbexMap design */
.oae-alle-orte2-wrapper.lost-places-theme.modern {
  /* LostUrbexMap inspired color palette */
  --lp-bg-primary: #0a0e1a;
  --lp-bg-secondary: #111827;
  --lp-bg-tertiary: #1f2937;
  --lp-bg-card: #1f2937;
  --lp-bg-overlay: rgba(0, 0, 0, 0.6);

  --lp-text-primary: #f9fafb;
  --lp-text-secondary: #d1d5db;
  --lp-text-muted: #9ca3af;
  --lp-text-accent: #60a5fa;

  --lp-border-primary: #374151;
  --lp-border-accent: #3b82f6;
  --lp-border-danger: #ef4444;

  --lp-accent-primary: #3b82f6; /* blue like LuMap */
  --lp-accent-hover: #60a5fa;
  --lp-accent-dark: #2563eb;
  --lp-accent-rust: #f59e0b; /* amber/orange */
  --lp-accent-blood: #ef4444; /* red */
  --lp-accent-success: #10b981; /* emerald green */

  --lp-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --lp-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --lp-shadow-lg: 0 10px 25px rgba(0,0,0,0.5);

  --lp-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --lp-font-secondary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Remove decorative textures and heavy text-shadows */
.oae-alle-orte2-wrapper.lost-places-theme.modern::before { display: none; }
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-group label {
  background-color: transparent !important;
  text-shadow: none !important;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--lp-text-secondary) !important;
}

/* Inputs: LostUrbexMap style */
.oae-alle-orte2-wrapper.lost-places-theme.modern .search-input,
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-select {
  background: var(--lp-bg-tertiary);
  border: 1px solid var(--lp-border-primary);
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .search-input:focus,
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-select:focus {
  border-color: var(--lp-border-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), inset 0 2px 4px rgba(0,0,0,0.2);
  background: var(--lp-bg-card);
}

/* Primary action buttons: LostUrbexMap style */
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-submit,
.oae-alle-orte2-wrapper.lost-places-theme.modern .layout-btn,
.oae-alle-orte2-wrapper.lost-places-theme.modern .geo-location-btn {
  background: linear-gradient(135deg, var(--lp-accent-primary) 0%, var(--lp-accent-dark) 100%);
  border: 0;
  color: #ffffff;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0.25px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-submit:hover,
.oae-alle-orte2-wrapper.lost-places-theme.modern .layout-btn:hover,
.oae-alle-orte2-wrapper.lost-places-theme.modern .geo-location-btn:hover {
  background: linear-gradient(135deg, var(--lp-accent-hover) 0%, var(--lp-accent-primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}
/* Remove shimmer sweep */
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-submit::before,
.oae-alle-orte2-wrapper.lost-places-theme.modern .layout-btn::before,
.oae-alle-orte2-wrapper.lost-places-theme.modern .geo-location-btn::before { display: none; }

/* Reset button: modern danger/rose */
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-reset {
  background: var(--lp-accent-blood);
  color: #fff;
  border: 0;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .filter-reset:hover {
  background: #f87171;
}

/* Cards: LostUrbexMap style */
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-card {
  border: 1px solid var(--lp-border-primary);
  border-radius: 12px;
  box-shadow: var(--lp-shadow-md);
  transition: all 0.3s ease;
  background: var(--lp-bg-card);
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-card::before { display: none; }
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  border-color: var(--lp-border-accent);
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-thumbnail img {
  height: 220px;
  filter: none;
  border-radius: 12px 12px 0 0;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-card:hover .place-thumbnail img {
  transform: scale(1.03);
}

/* Distance badge: pill with indigo */
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-distance {
  background: var(--lp-accent-primary);
  border: 0;
  color: #0a0f1a;
  box-shadow: none;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-distance::before { content: '📍'; }
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-distance::after { display: none; }

/* Badges: LostUrbexMap style */
.oae-alle-orte2-wrapper.lost-places-theme.modern .kategorie-badge {
  background: linear-gradient(135deg, var(--lp-accent-rust), #fb923c);
  color: #ffffff;
  border: 0;
  font-weight: 600;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .region-badge {
  background: linear-gradient(135deg, var(--lp-accent-success), #34d399);
  color: #ffffff;
  border: 0;
  font-weight: 600;
}

/* Layout header */
.oae-alle-orte2-wrapper.lost-places-theme.modern .results-header {
  border-bottom: 1px solid var(--lp-border-primary);
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .results-count {
  color: var(--lp-text-muted);
}

/* Place actions (fav/visited) lighter chrome, keep state selectors intact */
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-btn {
  background: #0b1220;
  border: 1px solid var(--lp-border-primary);
  color: var(--lp-text-secondary);
  opacity: 1;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-btn:hover:not(.active):not([aria-pressed="true"]) {
  background: #111a2c;
  border-color: var(--lp-border-accent);
}
/* Active states retain existing gradients but harmonize colors via variables above */

/* Pagination */
.oae-alle-orte2-wrapper.lost-places-theme.modern .pagination-link {
  background: #0b1220;
  border: 1px solid var(--lp-border-primary);
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .pagination-link:hover {
  background: var(--lp-accent-primary);
  color: #0a0f1a;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .pagination-item.current .pagination-link {
  background: var(--lp-accent-primary);
  color: #ffffff;
  border: 0;
}

/* Filter form improvements */
.oae-alle-orte2-wrapper.lost-places-theme.modern .oae-filter-form {
  background: var(--lp-bg-secondary);
  border: 1px solid var(--lp-border-primary);
  box-shadow: var(--lp-shadow-lg);
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .oae-filter-form::before { display: none; }

/* Place titles */
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-title a {
  color: var(--lp-text-primary);
  font-weight: 600;
}
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-title a:hover {
  color: var(--lp-accent-primary);
}

/* Distance badge with LuMap style */
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-distance {
  background: linear-gradient(135deg, var(--lp-accent-primary), var(--lp-accent-dark));
  color: #ffffff;
  border: 0;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  font-weight: 600;
}

/* Modern place buttons */
.oae-alle-orte2-wrapper.lost-places-theme.modern .place-btn {
  background: var(--lp-bg-tertiary);
  border: 1px solid var(--lp-border-primary);
  border-radius: 8px;
  font-weight: 500;
}

/* ===== HIDE WORDPRESS POST TITLE & GROUP BLOCKS ===== */
/* Very specific targeting - only hide the exact post title structure */

/* Hide the specific post title with "test" text (safest approach) */
h1.alignwide.wp-block-post-title.has-large-font-size:contains("test") {
  display: none !important;
}

/* Hide the group block that contains the specific title structure */
.wp-block-group.alignfull.has-tertiary-background-color.has-background.has-global-padding.is-content-justification-center h1.alignwide.wp-block-post-title.has-large-font-size {
  display: none !important;
}

/* Hide the entire group block if it only contains the post title */
.wp-block-group.alignfull.has-tertiary-background-color.has-background.has-global-padding.is-content-justification-center:has(h1.alignwide.wp-block-post-title.has-large-font-size):not(:has(*:not(h1.wp-block-post-title))) {
  display: none !important;
}

/* Fallback: Hide group blocks that contain ONLY a post title (and nothing else) */
.wp-block-group.alignfull:has(h1.wp-block-post-title):not(:has(div)):not(:has(p)):not(:has(.oae-alle-orte2-wrapper)) {
  display: none !important;
}

/* Make sure OAE wrapper is always visible */
.oae-alle-orte2-wrapper,
.oae-alle-orte2-wrapper.lost-places-theme,
.oae-alle-orte2-wrapper.lost-places-theme.modern {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
