/* ==========================================================================
   Trip Card Component
   ========================================================================== */
.trip-card-component {
  background-color: var(--SecondaryBG);
  border-radius: 24px;
  padding: 20px 0 0 0;
  margin-bottom: 30px;
  box-shadow: 0 12px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  font-family: "Poppins", sans-serif;
  overflow: visible;
  margin-top: 30px;
  justify-content: space-between;
}

.trip-card-component:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 15px rgba(0, 0, 0, 0.2);
}

/* Variant: Home Trips (Image Banner) */
.trip-card-component.home-trips {
  overflow: hidden;
  /* Clips the banner image to border radius */
  padding: 0;
  margin: 0;
  flex: 1 1 300px; 
  min-width: 250px;
  max-width: 100%;
}

.trip-card-banner {
  width: 100%;
  height: 150px;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Header Styles */
.trip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 20px;
  margin-bottom: 20px;
}

.avatar-wrapper {
  position: absolute;
  top: -25px;
  left: -15px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.driver-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.header-content {
  margin-left: 60px;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.driver-name {
  font-weight: 500;
  font-size: 1.1rem;
  color: #111;
}

.rating-container {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 1.1rem;
  color: #111;
  gap: 5px;
}

/* Body and Timeline Styles */
.trip-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

/* Horizontal Timeline (Default/Search) */
.timeline-graphic {
  display: flex;
  align-items: center;
  width: 80%;
  justify-content: center;
  position: relative;
  height: 40px;
}

.circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: white;
  border: 4px solid #000;
  z-index: 2;
}

.line {
  flex: 1;
  height: 6px;
  background-color: #000;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 -2px;
}

.duration-text {
  background-color: var(--SecondaryBG);
  padding: 0 5px;
  font-weight: 500;
  font-size: 1.1rem;
  color: #000;
  z-index: 3;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  width: 90%;
  margin-top: 5px;
}

.label-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100px;
}

.time {
  font-size: 1.4rem;
  font-weight: 600;
  color: #000;
  line-height: 1.2;
}

.city {
  font-size: 1.2rem;
  font-weight: 400;
  color: #000;
}

/* Vertical Timeline (Home Variant) */
.timeline-container.vertical {
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 10px 0;
}

.timeline-graphic-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30px;
}

.line-vertical {
  width: 4px;
  height: 40px;
  background-color: var(--MainAccent);
  margin: -2px 0;
}

.timeline-labels-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.city-item {
  font-size: 1.3rem;
  font-weight: 500;
  color: #000;
}

.duration-item {
  font-size: 1rem;
  color: #555;
  margin-top: 5px;
}

/* Footer and Info Styles */
.trip-seats-info {
  font-size: 1.3rem;
  font-weight: 400;
  color: #000;
  margin-top: 20px;
  text-align: center;
}

.trip-action-btn {
  width: 100%;
  background-color: var(--MainAccent);
  color: white;
  border: none;
  padding: 15px;
  font-size: 1.4rem;
  font-weight: 500;
  text-align: center;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.trip-action-btn:hover {
  background-color: var(--SecondaryAccent);
}

.trip-action-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

@media only screen and (max-width: 768px) {
  .trip-card-component {
    margin-left: 10px;
    margin-right: 10px;
  }
}
