/* Coastal Cabana EC - Location Map Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f7fa;
  min-height: 100vh;
  padding: 20px;
  color: #1a1a1a;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 40px;
  color: #1a1a1a;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.1rem;
  color: #666;
  font-weight: 400;
}

.location-explorer {
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #eaeaea;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 12px;
  padding: 20px 30px;
  background: #fff;
  border-bottom: 1px solid #eaeaea;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.category-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.category-tab {
  padding: 10px 20px;
  border: 1px solid #e0e0e0;
  background: white;
  color: #555;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-tab:hover {
  background: #f8f9fa;
  border-color: #d0d0d0;
  color: #333;
}

.category-tab.active {
  background: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tab-icon {
  font-size: 1.2rem;
}

/* Map */
#map {
  width: 100%;
  height: 600px;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  border-bottom: 1px solid #eaeaea;
}

/* Travel Info Panel */
.travel-info-panel {
  background: #fff;
  border-radius: 0 0 12px 12px;
  padding: 25px;
  box-shadow: none;
}

.travel-info-panel h3 {
  color: #1a1a1a;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#travel-details {
  color: #555;
}

.info-message {
  color: #666;
  font-style: normal;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  text-align: center;
  border: 1px dashed #e0e0e0;
}

.travel-route {
  background: white;
  padding: 0;
  border-radius: 0;
  border-left: none;
}

.travel-route h4 {
  color: #1a1a1a;
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
}

.travel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat {
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #eaeaea;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  color: #1a1a1a;
  font-weight: 700;
}

.route-note {
  color: #888;
  font-size: 0.85rem;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eaeaea;
}

.extra-info {
  margin-top: 8px;
  color: #555;
  font-size: 0.95rem;
}

/* Info Window Styles */
/* Override Google Maps default styles */
.gm-ui-hover-effect {
  display: none !important; /* Hide default close button */
}

.gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
}

.gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
}

.gm-style-iw-tc {
  display: none !important; /* Hide the triangle pointer if desired, or keep it */
}

.info-window,
.info-hover,
.info-detailed,
.info-error {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Info Window Content Styles */
.info-detailed {
  width: 260px;
  padding: 0;
  background: white;
}

.info-thumbnail {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #f0f0f0;
}

.info-content {
  padding: 16px;
}

.info-title {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #202124;
  line-height: 1.3;
}

.info-meta {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  color: #70757a;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rating-star {
  color: #fbbc04;
}

.info-times {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8eaed;
}

.info-time-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #1a73e8;
  font-weight: 500;
  background: #f0f4ff;
  padding: 4px 10px;
  border-radius: 16px;
}

/* Error state */
.info-error {
  padding: 16px;
  width: 200px;
}

.info-hint {
  color: #70757a;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 8px;
}

/* Mobile Drawer Styles */
.location-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom);
  visibility: hidden;
}

.location-drawer.visible {
  transform: translateY(0);
  visibility: visible;
}

.drawer-handle {
  width: 40px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin: 12px auto;
}

.drawer-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  z-index: 2;
}

#drawer-content {
  padding: 0 20px 20px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Drawer Content Adaptations */
.location-drawer .info-detailed {
  width: 100%;
  max-width: none;
  box-shadow: none;
  border: none;
  padding: 0;
}

.location-drawer .info-thumbnail {
  height: 200px;
  margin: 0 -20px 16px -20px;
  width: calc(100% + 40px);
  border-radius: 0;
}

.location-drawer .info-title {
  font-size: 1.25rem;
}

.location-drawer .info-times {
  flex-direction: row;
  flex-wrap: wrap;
}

.location-drawer .info-time-item {
  flex: 1 1 auto;
  justify-content: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #eaeaea;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .location-explorer {
    padding: 20px;
  }

  .category-tabs {
    gap: 8px;
  }

  .category-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .tab-icon {
    font-size: 1rem;
  }

  #map {
    height: 400px;
  }

  .travel-info-panel {
    padding: 15px;
  }

  .travel-stats {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  .category-tab {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  #map {
    height: 350px;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.location-explorer {
  animation: fadeIn 0.5s ease-out;
}

.category-tab {
  animation: fadeIn 0.3s ease-out backwards;
}

.category-tab:nth-child(1) { animation-delay: 0.1s; }
.category-tab:nth-child(2) { animation-delay: 0.2s; }
.category-tab:nth-child(3) { animation-delay: 0.3s; }
.category-tab:nth-child(4) { animation-delay: 0.4s; }
.category-tab:nth-child(5) { animation-delay: 0.5s; }

/* Advanced Marker custom styles */

/* Condo marker pin */
.condo-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.condo-pin {
  width: 40px;
  height: 40px;
  background-color: #1a1a1a;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.pin-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-icon svg {
  fill: #FFFFFF;
  width: 22px;
  height: 22px;
}

.pulse-ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(26, 26, 26, 0.5);
  animation: pulse 2s infinite;
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  70% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Location markers with labels */
.location-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.marker-label {
  background-color: #FFFFFF;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  margin-bottom: 6px;
  position: relative;
  font-family: 'Inter', sans-serif;
}

/* Small triangle pointing down from label to pin */
.marker-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 0);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #FFFFFF;
}

.marker-pin {
  width: 14px;
  height: 14px;
  background-color: #555;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hover effect */
.location-marker:hover .marker-label {
  background-color: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.location-marker:hover .marker-label::after {
  border-top-color: #1a1a1a;
}

.location-marker:hover .marker-pin {
  transform: scale(1.2);
  transition: transform 0.2s ease;
  background-color: #1a1a1a;
}

