/**
 * Google Maps Attribution Collapser Styles
 * 
 * Styles for collapsing Google Maps required attribution elements
 * vertically by default, expanding them on hover.
 */

/* Default collapsed state - hide below viewport */
.google-maps-attribution-collapsed {
  max-height: 0px !important; /* Completely hidden when collapsed */
  overflow: hidden !important;
  transition: max-height 0.3s ease-in-out !important;
  cursor: pointer;
  opacity: 0 !important; /* Hide visually */
  pointer-events: none !important; /* Disable interaction when collapsed */
  /* CRITICAL: Don't override position - Google Maps uses absolute with bottom/right */
  /* Only modify height/overflow, let Google Maps handle positioning */
}

/* Expanded state on hover - must be more specific */
.google-maps-attribution-collapsed:hover {
  max-height: 200px !important;
  overflow: visible !important;
  opacity: 1 !important; /* Show when hovered */
  pointer-events: auto !important; /* Enable interaction when expanded */
}

/* Expanded state class */
.google-maps-attribution-expanded {
  max-height: 200px !important;
  overflow: visible !important;
  opacity: 1 !important; /* Show when expanded */
  pointer-events: auto !important; /* Enable interaction when expanded */
  /* CRITICAL: Don't override position - Google Maps uses absolute with bottom/right */
}

/* Ensure child elements are visible when expanded */
.google-maps-attribution-expanded .gmnoprint,
.google-maps-attribution-expanded .gm-style-cc {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Smooth transition for child elements */
.google-maps-attribution-collapsed .gmnoprint,
.google-maps-attribution-collapsed .gm-style-cc {
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

/* Ensure buttons and links remain clickable when expanded */
.google-maps-attribution-expanded button,
.google-maps-attribution-expanded a {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* CRITICAL: Don't force positioning - this was breaking the map */
/* Google Maps already positions attribution correctly - we only need to collapse height */
/* Removed: position, right, bottom, display, z-index - let Google Maps handle positioning */

/* Dark mode support */
.dark .google-maps-attribution-collapsed .gm-style-cc,
.dark .google-maps-attribution-expanded .gm-style-cc,
html.dark .google-maps-attribution-collapsed .gm-style-cc,
html.dark .google-maps-attribution-expanded .gm-style-cc {
  background: #1f2937 !important; /* Fully opaque dark background */
  color: #d1d5db !important; /* Light text for visibility */
}

.dark .google-maps-attribution-collapsed a,
.dark .google-maps-attribution-expanded a,
html.dark .google-maps-attribution-collapsed a,
html.dark .google-maps-attribution-expanded a {
  color: #d1d5db !important; /* Light text for links */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .google-maps-attribution-collapsed {
    transition: none !important;
  }
  
  .google-maps-attribution-collapsed .gmnoprint,
  .google-maps-attribution-collapsed .gm-style-cc {
    transition: none !important;
  }
}

