/* Map Navigation Styles */

/* Clickable address styling */
.address-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.address-clickable:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.address-clickable:active {
  transform: translateY(1px);
}

/* Map selection modal animations */
#map-selection-modal {
  animation: fadeIn 0.2s ease-out;
}

#map-selection-modal .bg-white,
#map-selection-modal .bg-gray-800 {
  animation: slideInUp 0.3s ease-out;
}

/* Ensure map app buttons are visible in light mode (Tailwind purge-safe) */
#google-maps-btn,
#apple-maps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem; /* ~py-3 px-4 */
  border-radius: 0.5rem; /* ~rounded-lg */
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

#google-maps-btn {
  background-color: #2563eb; /* blue-600 */
  color: #ffffff;
  border-color: #1d4ed8; /* blue-700 */
}

#apple-maps-btn {
  background-color: #ffffff; /* gray-800 */
  color: #ffffff;
  border-color: #ffffff;
}

/* Dark mode adjustments for Apple button subtle border */
.dark #apple-maps-btn {
  background-color: #111827; /* gray-900 */
  border-color: #374151; /* gray-700 */
}

/* Button hover effects */
#google-maps-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#apple-maps-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.3);
}

/* Focus states for accessibility */
#google-maps-btn:focus,
#apple-maps-btn:focus,
#cancel-map-btn:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

/* Dark mode adjustments */
.dark .address-clickable:hover {
  text-decoration-color: #60a5fa;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #map-selection-modal .bg-white,
  #map-selection-modal .bg-gray-800 {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
}

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

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

/* Loading state for address elements */
.address-clickable.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Success state for address elements */
.address-clickable.success {
  color: #059669;
}

/* Error state for address elements */
.address-clickable.error {
  color: #dc2626;
}

/* CRITICAL: Ensure proper contrast on dark overlays and backgrounds */
.dark *[style*="background: rgba(0"],
.dark *[style*="background-color: rgba(0"],
html.dark *[style*="background: rgba(0"],
html.dark *[style*="background-color: rgba(0"],
body.dark *[style*="background: rgba(0"],
body.dark *[style*="background-color: rgba(0"] {
  color: #f9fafb !important; /* Light text on dark backgrounds */
}

/* Ensure text is light on any very dark background */
*[style*="background: #0"],
*[style*="background-color: #0"],
*[style*="background: rgba(0, 0, 0"],
*[style*="background-color: rgba(0, 0, 0"] {
  color: #f9fafb !important; /* Light text on very dark backgrounds */
}

/* Override any gray-800 text that might appear on dark backgrounds in dark mode */
.dark .text-gray-800,
html.dark .text-gray-800,
body.dark .text-gray-800,
.dark [style*="color: #ffffff"],
html.dark [style*="color: #ffffff"],
body.dark [style*="color: #ffffff"] {
  color: #f9fafb !important; /* Light text in dark mode */
}

/* ULTRA-AGGRESSIVE CONTRAST FIX - Override any remaining gray-800 text in dark mode */

/* NUCLEAR OPTION: Force white text on any element with gray-800 color in dark contexts */
html.dark *[style*="color: rgb(31, 41, 55)"],
body.dark *[style*="color: rgb(31, 41, 55)"],
.dark *[style*="color: rgb(31, 41, 55)"],
html.dark *[style*="color:rgb(31, 41, 55)"],
body.dark *[style*="color:rgb(31, 41, 55)"],
.dark *[style*="color:rgb(31, 41, 55)"],
html.dark *[style*="color: rgb(31,41,55)"],
body.dark *[style*="color: rgb(31,41,55)"],
.dark *[style*="color: rgb(31,41,55)"],
html.dark *[style*="color:rgb(31,41,55)"],
body.dark *[style*="color:rgb(31,41,55)"],
.dark *[style*="color:rgb(31,41,55)"] {
  color: #ffffff !important;
}

/* Cover computed styles that might result in gray-800 */

