/* Enhanced Production Layout */
.locations-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative;
}

/* Loading state */
.locations-layout.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.8);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Left Side: Location List */
.locations-names-section {
  background: #f8f9fa;
  padding: 20px 0;
  border-right: 1px solid #e9ecef;
}

.locations-carousel-container {
  position: relative;
  height: 500px;
  display: flex;
  flex-direction: column;
}

.locations-carousel-wrapper {
  flex: 1;
  overflow: hidden;
  padding: 0 20px;
}

.locations-carousel-track {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  gap: 8px;
}

/* Enhanced Location Cards */
.location-card {
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.location-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.location-card:hover::before {
  left: 100%;
}

.location-card:hover {
  border-color: #1fb6ff;
  box-shadow: 0 2px 8px rgba(31,182,255,0.15);
}

.location-card.active {
  background: #1fb6ff;
  border-color: #1fb6ff;
  color: #fff;
}

.location-icon {
  width: 36px;
  height: 36px;
  background: #f8f9fa;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a2a6a;
  font-size: 14px;
  flex-shrink: 0;
}

.location-card.active .location-icon {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.location-info {
  flex: 1;
  min-width: 0;
}

.location-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-card.active .location-info h4 {
  color: #fff;
}

.location-info p {
  margin: 0;
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

.location-card.active .location-info p {
  color: rgba(255,255,255,0.8);
}

/* Right Side: Clean Map Section */
.locations-map-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.map-container {
  height: 500px;
  display: flex;
  flex-direction: column;
}

.map-header {
  padding: 0 0 16px 0;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 16px;
}

.map-header h3 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 600;
  color: #212529;
}

.map-header p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.map-details {
  padding: 0 0 16px 0;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 16px;
}

.map-details p {
  display: flex;
  align-items: center;
  margin: 8px 0;
  font-size: 14px;
  color: #495057;
}

.map-details i {
  color: #1fb6ff;
  margin-right: 8px;
  width: 16px;
  font-size: 12px;
}

.map-iframe-container {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.map-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  transition: opacity 0.3s ease;
}

/* Simple Navigation Buttons */
.locations-carousel-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #dee2e6;
  color: #495057;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 20px;
}

.locations-carousel-btn:hover {
  background: #1fb6ff;
  color: #fff;
  border-color: #1fb6ff;
}

.locations-carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f8f9fa;
}

.locations-carousel-btn:disabled:hover {
  background: #f8f9fa;
  color: #495057;
  border-color: #dee2e6;
}

/* Simple Indicators */
.locations-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px 0 20px;
}

.carousel-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dee2e6;
  cursor: pointer;
  transition: background 0.2s ease;
}

.carousel-indicator.active {
  background: #1fb6ff;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .locations-layout {
    grid-template-columns: 350px 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .locations-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0 1rem;
  }
  
  .locations-names-section {
    order: 2;
    border-right: none;
    border-top: 1px solid #e9ecef;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  }
  
  .locations-map-section {
    order: 1;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  }
  
  .locations-carousel-container {
    height: auto;
    flex-direction: column;
  }
  
  .locations-carousel-wrapper {
    padding: 0;
    overflow: visible;
  }
  
  .locations-carousel-track {
    flex-direction: row;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 0 0.75rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .locations-carousel-track::-webkit-scrollbar {
    height: 6px;
  }
  
  .locations-carousel-track::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin: 0 10px;
  }
  
  .locations-carousel-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #1565c0, #2196f3);
    border-radius: 3px;
    transition: background 0.3s ease;
  }
  
  .locations-carousel-track::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #0d47a1, #1565c0);
  }
  
  .location-card {
    min-width: 200px;
    max-width: 220px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: rgba(31, 182, 255, 0.2);
    position: relative;
    overflow: hidden;
  }
  
  .location-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 182, 255, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
  }
  
  .location-card:active::after,
  .location-card:focus::after {
    opacity: 1;
  }
  
  .location-card:active {
    transform: scale(0.96);
  }
  
  .location-card.active {
    background: linear-gradient(135deg, #1fb6ff, #0d47a1);
    color: white;
    border-color: #1fb6ff;
    box-shadow: 0 8px 25px rgba(31, 182, 255, 0.3);
  }
  
  .location-card.active .location-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
  }
  
  .location-card.active h4,
  .location-card.active p {
    color: white;
  }
  
  .locations-carousel-btn {
    display: none;
  }
  
  .locations-carousel-indicators {
    display: none;
  }
  
  .map-container {
    height: 350px;
  }
  
  .map-iframe-container {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .locations-layout {
    margin: 0 0.75rem;
    border-radius: 12px;
    gap: 1rem;
  }
  
  .locations-names-section,
  .locations-map-section {
    padding: 1rem;
  }
  
  .location-card {
    min-width: 180px;
    max-width: 200px;
    padding: 0.875rem;
  }
  
  .location-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .location-info h4 {
    font-size: 0.9rem;
    line-height: 1.3;
  }
  
  .location-info p {
    font-size: 0.8rem;
  }
  
  .map-container {
    height: 300px;
  }
  
  .map-iframe-container {
    height: 200px;
  }
  
  .map-header h3 {
    font-size: 1.25rem;
  }
  
  .map-details p {
    font-size: 0.875rem;
    line-height: 1.4;
  }
  
  .map-details i {
    width: 18px;
    font-size: 14px;
  }
}
