/* Card-based sections */
.schedule-card {
  /* reserve space for meta chips that sit absolutely at top-right */
  --meta-reserve: 40px;          /* vertical space to keep clear for the chips */
  --meta-inline-reserve: 260px;  /* horizontal right-side space reserved for chips */

  position: relative; /* Needed for absolute child positioning */
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;

  /* add top padding + reserved space so content sits below the chips
     and shift content away from the right so it doesn't go under them */
  padding-top: calc(20px + var(--meta-reserve));
  padding-right: calc(20px + var(--meta-inline-reserve));
  padding-bottom: 16px;
  padding-left: 20px;

  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0.6; /* Faded look for unselected */
}
/* ---------------- Meta chips (language, price, spots) ---------------- */
.schedule-meta {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;             /* spacing between pills */
  z-index: 2;
}

/* Order them right-to-left visually (rightmost first) */
.schedule-meta .schedule-language-card,
.schedule-meta .schedule-day-language-card { order: 3; }
.schedule-meta .schedule-price-card,
.schedule-meta .schedule-day-price-card   { order: 2; }
.schedule-meta .schedule-spots-card,
.schedule-meta .schedule-day-spots-card   { order: 1; }

/* Base chip look */
.schedule-meta .schedule-language-card,
.schedule-meta .schedule-day-language-card,
.schedule-meta .schedule-price-card,
.schedule-meta .schedule-day-price-card,
.schedule-meta .schedule-spots-card,
.schedule-meta .schedule-day-spots-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;         /* full pill */
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Subtle icon bubble, optional if your createScheduleCard injects an <span class="icon"> */
.schedule-meta .schedule-language-card .icon,
.schedule-meta .schedule-day-language-card .icon,
.schedule-meta .schedule-price-card .icon,
.schedule-meta .schedule-day-price-card .icon,
.schedule-meta .schedule-spots-card .icon,
.schedule-meta .schedule-day-spots-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  font-size: 11px;
}

/* Per-chip accents */
.schedule-meta .schedule-language-card,
.schedule-meta .schedule-day-language-card {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.schedule-meta .schedule-price-card,
.schedule-meta .schedule-day-price-card {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;                /* readable green for prices */
}

.schedule-meta .schedule-spots-card,
.schedule-meta .schedule-day-spots-card {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

/* Title and text styling */
.schedule-card h3,
.day-schedule-card h3 {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: #2980b9;
}

.schedule-card ul,
.day-schedule-card ul,
.info-card p {
  font-size: 1.1em;
  line-height: 1.6;
  color: #34495e;
}

.schedule-card ul,
.day-schedule-card ul {
  list-style: none;
  padding: 0;
}

.schedule-card li,
.day-schedule-card li {
  background-color: white;
  color: black;
  pointer-events: auto;
  margin-bottom: 10px;
}

/* Hover effect for cards */
.schedule-card:hover,
.day-schedule-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Selected schedule styles */
.selected-schedule {
  border: 2px solid #4CAF50;
  background-color: #A7D3F4 !important;
  box-shadow: 0 6px 15px rgba(76, 175, 80, 0.5);
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Unselected schedule styles */
.unselected-schedule {
  border: 2px solid transparent;
  opacity: 0.6;
}

/* Selected itinerary item */
.schedule-card li.selected,
.day-schedule-card li.selected {
  background-color: #4CAF50;
  color: white;
}

.schedule-card li:hover,
.day-schedule-card li:hover {
  background-color: #f1f1f1;
  cursor: pointer;
}

.schedule-card li.selected:hover,
.day-schedule-card li.selected:hover {
  background-color: #45a049;
}

/* Inactive state */
.schedule-card.inactive,
.day-schedule-card.inactive {
  opacity: 0.6;
  pointer-events: auto;
}

/* ---------------- Responsive for Mobile ---------------- */
@media (max-width: 768px) {
  .schedule-card,
  .day-schedule-card {
    /* On mobile the chips are in normal flow, so remove the reserved spaces */
    --meta-reserve: 0px;
    --meta-inline-reserve: 0px;

    width: 100% !important;
    padding: 16px !important;
    margin-bottom: 20px;
    font-size: 1em;
    opacity: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .schedule-card h3,
  .day-schedule-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
  }

  .schedule-card ul,
  .day-schedule-card ul,
  .info-card p {
    font-size: 1em;
    line-height: 1.4;
  }

  .schedule-card li,
  .day-schedule-card li {
    font-size: 0.95em;
    padding: 8px;
    margin-bottom: 8px;
  }

  .schedule-card li.selected,
  .day-schedule-card li.selected {
    background-color: #4CAF50;
    color: white;
  }

  /* Make meta chips flow above the title on mobile */
  .schedule-meta {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }

  .schedule-meta .schedule-language-card,
  .schedule-meta .schedule-day-language-card,
  .schedule-meta .schedule-price-card,
  .schedule-meta .schedule-day-price-card,
  .schedule-meta .schedule-spots-card,
  .schedule-meta .schedule-day-spots-card {
    font-size: 0.95rem;
  }

  .selected-schedule {
    border: 2px solid #4CAF50;
    background-color: #d4f4dd !important;
  }

  .unselected-schedule {
    border: none;
    opacity: 0.9;
  }
}
/* -----------------------------------------------------------------
   Language chip (tour_language) on schedule-day cards
   ----------------------------------------------------------------- */
.schedule-meta .schedule-day-tourlang-card { order: 4; }

.schedule-meta .schedule-day-tourlang-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(36, 86, 200, 0.25);
  background: #eef4ff;        /* soft blue, distinct from the age chip */
  color: #2456c8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* -----------------------------------------------------------------
   Language chip (tour_language) on schedule cards (nemo system)
   Works in the flex .schedule-meta row and the absolute fallback.
   ----------------------------------------------------------------- */
.schedule-meta .schedule-tourlang-card { order: 4; }

.schedule-tourlang-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(36, 86, 200, 0.25);
  background: #eef4ff;
  color: #2456c8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}