/* ==========================================================================
   elbstrand.de Guide - Map Stylesheet
   Passend zum minimalistischen, modernen Design von elbstrand.de
   ========================================================================== */

:root {
  --color-black: #000000;
  --color-dark: #1a1a1a;
  --color-grey-dark: #444444;
  --color-grey: #777777;
  --color-grey-light: #e5e5e5;
  --color-bg-light: #f8f9fa;
  --color-white: #ffffff;
  
  --color-accent: #000000;
  --color-accent-hover: #333333;
  --color-rating-star: #eab308;
  --color-open: #16a34a;
  --color-closed: #dc2626;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-black);
  background-color: #e5e5e5;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Main Layout Container */
#app {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

/* Map Canvas Container */
#map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

/* Category Filter Component */
.category-filter-component {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  pointer-events: auto;
}

.category-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--color-white);
  color: var(--color-black);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.category-filter-trigger:hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  border-color: rgba(0, 0, 0, 0.16);
}

.category-filter-trigger.open {
  border-color: var(--color-black);
}

.category-filter-trigger .trigger-icon {
  font-size: 19px;
  color: var(--color-black);
}

.category-filter-trigger .trigger-label {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.category-filter-trigger .trigger-badge {
  background: var(--color-bg-light);
  color: var(--color-dark);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-filter-trigger.filtered .trigger-badge {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.category-filter-trigger .trigger-arrow {
  font-size: 20px;
  color: var(--color-grey);
  transition: transform 0.25s ease;
}

.category-filter-trigger.open .trigger-arrow {
  transform: rotate(180deg);
}

/* Category Filter Dropdown / Grid Popover */
.category-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 20;
}

.category-filter-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.category-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-grey-light);
  background: #fafafa;
}

.category-dropdown-header .dropdown-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dropdown-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-grey);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-close-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-black);
}

.dropdown-close-btn .material-symbols-outlined {
  font-size: 18px;
}

.category-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.category-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-dark);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-item-btn:hover {
  background: #ebebeb;
  border-color: rgba(0, 0, 0, 0.08);
}

.category-item-btn.active {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.category-item-btn .item-icon {
  font-size: 18px;
  color: var(--color-dark);
  flex-shrink: 0;
}

.category-item-btn.active .item-icon {
  color: var(--color-white);
}

.category-item-btn .item-name {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-item-btn .item-count {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.6;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.category-item-btn.active .item-count {
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.category-item-btn.btn-all {
  grid-column: 1 / -1;
  font-weight: 600;
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

.category-item-btn.btn-all.active {
  background: var(--color-black);
  color: var(--color-white);
}

/* Zero-Size Anchor Wrapper für exakte GPS-Spitzen-Ausrichtung */
.custom-marker-wrapper {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 100;
}

.custom-marker-wrapper.active,
.custom-marker-wrapper:hover {
  z-index: 500;
}

.custom-marker-wrapper.home-wrapper {
  z-index: 1000 !important;
}

/* Custom Marker with Material Icon - Spitze unten in der Mitte */
.custom-map-marker {
  position: absolute;
  left: -20px;
  top: -48px;
  width: 40px;
  height: 50px;
  color: #000000;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  transform-origin: 20px 48px;
}

.custom-map-marker:hover,
.custom-map-marker.active {
  color: #bc3230;
  transform: scale(1.18);
}

/* Heimatstandort Marker (Grüner Deich 2, Bleckede - "cabin") - Immer im Vordergrund */
.custom-map-marker.home-marker {
  color: #bc3230;
  cursor: default;
  z-index: 1000 !important;
}

.custom-map-marker.home-marker:hover,
.custom-map-marker.home-marker.active {
  color: #bc3230;
  transform: none;
  z-index: 1000 !important;
}

.custom-map-marker .marker-pin-svg {
  position: absolute;
  inset: 0;
  width: 40px;
  height: 50px;
  overflow: visible;
}

.custom-map-marker .marker-icon-inner {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  font-family: 'Material Symbols Outlined' !important;
  font-size: 20px;
  line-height: 1;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
}

/* Places UI Kit Container */
.places-ui-kit-wrapper {
  font-family: var(--font-family);
  color: var(--color-black);
}

/* Interstitial / Cookie Consent Modal (2-Klick-Lösung) */
.interstitial-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.interstitial-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.interstitial-card {
  width: 100%;
  max-width: 480px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.interstitial-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-bg-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-black);
}

.interstitial-icon-wrapper .material-symbols-outlined {
  font-size: 32px;
}

.interstitial-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--color-black);
}

.interstitial-desc {
  font-size: 14px;
  color: var(--color-grey-dark);
  line-height: 1.6;
  margin-bottom: 24px;
}

.interstitial-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-accept-all {
  width: 100%;
  padding: 12px 20px;
  background: var(--color-black);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-accept-all:hover {
  background: var(--color-accent-hover);
}

.interstitial-footer {
  margin-top: 18px;
  font-size: 12px;
  color: var(--color-grey);
}

.interstitial-footer a {
  text-decoration: underline;
}



/* Status Banner */
.status-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  max-width: 90%;
  border: 1px solid var(--color-grey-light);
}

.status-banner.status-info {
  color: var(--color-dark);
  border-color: #cbd5e1;
}

.status-banner.status-warning {
  color: #854d0e;
  border-color: #fef08a;
  background: #fefce8;
}

.status-banner.status-error {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

.status-icon {
  font-size: 18px;
}
