/* Enhanced Location Cards Styling - Updated for true card swapping */
.location-cards-section {
  margin: 2rem 0;
  background-color: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
}

.section-title {
  color: #333;
  font-weight: 600;
  position: relative;
  padding-left: 15px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 70%;
  background-color: #289a96;
  border-radius: 3px;
}

/* Container for the cards */
.location-cards-container {
  position: relative;
  padding: 1rem 0;
  max-width: 900px;
  margin: 0 auto;
}

/* Cards wrapper - enables the sliding animation */
.location-cards {
  display: flex;
  position: relative;
  transition: transform 0.5s ease-in-out;
  min-height: 250px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 2rem);
}

/* Individual location card */
.location-card {
  flex: 0 0 100%;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease, transform 0.5s ease-in-out;
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  margin: 0 0.5rem;
  border: 1px solid rgba(40, 154, 150, 0.15);
  max-width: calc(50% - 1rem); /* Adjust as needed */
}

.location-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: rgba(40, 154, 150, 0.3);
}

/* Card header with icon */
.location-card-header {
  display: flex;
  align-items: center;
  background-color: rgba(40, 154, 150, 0.05);
  padding: 1rem;
  border-bottom: 1px solid rgba(40, 154, 150, 0.15);
}

.location-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.location-icon img {
  width: 24px;
  height: 24px;
}

.location-type {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #289a96;
}

/* Card body with location details */
.location-card-body {
  padding: 1.25rem;
}

.location-name {
  font-size: 1.35rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
}

.location-address {
  display: flex;
  align-items: flex-start;
  font-size: 0.95rem;
  color: #6c757d;
}

.location-address i {
  margin-right: 10px;
  margin-top: 4px;
  color: #289a96;
}

.location-address p {
  margin: 0;
  line-height: 1.5;
}

/* Card footer with schedule info */
.location-card-footer {
  padding: 0.75rem 1.25rem;
  background-color: #f8f9fa;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.schedule-info {
  display: flex;
  justify-content: space-between;
}

.schedule-item {
  text-align: center;
  flex: 1;
}

.schedule-label {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.schedule-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

/* Navigation controls */
.location-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.nav-dots {
  display: flex;
  margin-bottom: 1rem;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #dee2e6;
  margin: 0 5px;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background-color: #289a96;
  transform: scale(1.2);
}

.nav-buttons {
  display: flex;
  align-items: center;
}

.nav-arrow, .toggle-btn {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #6c757d;
}

.nav-arrow:hover, .toggle-btn:hover {
  background-color: #289a96;
  color: white;
  border-color: #289a96;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(40, 154, 150, 0.2);
}

.toggle-btn {
  background-color: #289a96;
  color: white;
  border-color: #289a96;
  margin: 0 15px;
}

.toggle-btn i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.toggle-btn.flipped i {
  transform: rotate(180deg);
}

/* Trip summary bar (desktop only) */
.trip-summary {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.trip-detail {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.trip-detail i {
  color: #23c5ba;
  font-size: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.trip-detail > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.detail-label {
  color: #6c757d;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
}

.detail-value {
  font-weight: 600;
  color: #333;
  font-size: 15px;
  display: block;
  white-space: nowrap;
}

/* Animation classes */
.location-cards.sliding {
  transition: transform 0.5s ease-out;
}

.location-cards.flipping .location-card {
  transition: transform 0.5s ease-in-out;
}

/* Position classes */
.location-cards.show-left {
  transform: translateX(0);
}

.location-cards.show-right {
  /* Adjust based on your layout */
  transform: translateX(-50%);
}

/* Special animations for flipping */
.location-cards.flipping .location-card {
  animation: cardFlip 0.5s ease-in-out;
}

@keyframes cardFlip {
  0% {
    transform: rotateY(0deg) translateZ(0);
    opacity: 1;
  }
  25% {
    transform: rotateY(45deg) translateZ(20px);
    opacity: 0.8;
  }
  75% {
    transform: rotateY(-45deg) translateZ(20px);
    opacity: 0.8;
  }
  100% {
    transform: rotateY(0deg) translateZ(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .location-cards {
    flex-direction: column;
  }
  
  .location-card {
    margin: 0 0 1rem 0;
    max-width: 100%;
  }
  
  /* For vertical layout on mobile */
  .location-cards.show-right {
    transform: translateY(-50%);
  }
  
  .toggle-btn.flipped i {
    transform: rotate(180deg);
  }
  
  /* Alternative animation for mobile */
  @keyframes cardFlip {
    0% {
      transform: rotateX(0deg) translateZ(0);
      opacity: 1;
    }
    25% {
      transform: rotateX(45deg) translateZ(20px);
      opacity: 0.8;
    }
    75% {
      transform: rotateX(-45deg) translateZ(20px);
      opacity: 0.8;
    }
    100% {
      transform: rotateX(0deg) translateZ(0);
      opacity: 1;
    }
  }
  
  .trip-summary {
    flex-direction: column;
    gap: 20px;
    padding: 1rem;
  }
  
  .trip-detail {
    justify-content: center;
    width: 100%;
  }
  
  .trip-detail > div {
    align-items: center;
    text-align: center;
    min-width: auto;
  }
}

/* For extra-small screens */
@media (max-width: 576px) {
  .location-card-header {
    padding: 0.75rem;
  }
  
  .location-icon {
    width: 40px;
    height: 40px;
  }
  
  .location-name {
    font-size: 1.25rem;
  }
  
  .schedule-time {
    font-size: 1rem;
  }
}

/* Card swap transition effect */
.location-cards .location-card {
  transition: all 0.3s ease-in-out;
}

.trip-summary.error-state .trip-detail {
    opacity: 0.5;
}

.trip-summary.error-state::after {
    content: "⚠️ Unable to load trip details";
    position: absolute;
    bottom: -20px;
    right: 10px;
    font-size: 12px;
    color: #721c24;
    background-color: #f8d7da;
    padding: 2px 6px;
    border-radius: 4px;
}

.trip-detail .detail-value {
    transition: opacity 0.3s ease;
}

.trip-detail .detail-value:empty::after {
    content: "Loading...";
    color: #6c757d;
    font-style: italic;
} 