/* Trip details popup */
body.tm-lock {
  overflow: hidden;
}

.tm {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.tm.open {
  display: flex;
}

.tm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 40, 0.62);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.tm-card {
  position: relative;
  width: min(1040px, 100%);
  max-height: 90vh;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--card, #fff);
  border-radius: 28px;
  box-shadow: 0 40px 90px -18px rgba(9, 20, 45, 0.5), 0 2px 0 rgba(255, 255, 255, 0.9) inset;
  animation: tm-pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.12);
  scrollbar-width: thin;
}

@keyframes tm-pop {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.975);
  }
}

.tm-close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--foreground, #172033);
  box-shadow: 0 6px 18px rgba(15, 30, 60, 0.18);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tm-close:hover {
  background: var(--primary, #2f6fed);
  color: #fff;
  transform: rotate(90deg);
}

.tm-head {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 72px 24px 26px;
  border-bottom: 1px solid var(--border, #e3eaf3);
  background: linear-gradient(120deg, var(--primary-soft, #eaf2ff), #fff 72%);
}

.tm-head img {
  flex: none;
  width: 154px;
  height: 112px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 26px -10px rgba(15, 40, 90, 0.4);
}

.tm-head-copy {
  min-width: 0;
}

.tm-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary, #2f6fed);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tm-head h2 {
  margin: 8px 0 4px;
  color: var(--foreground, #172033);
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.15;
}

.tm-head p {
  margin: 0;
  color: var(--muted-foreground, #637083);
  font-size: 0.94rem;
  line-height: 1.55;
}

.tm-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 30px;
  padding: 26px;
}

.tm-col h3 {
  margin: 0 0 16px;
  color: var(--foreground, #172033);
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.tm-days {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-days li {
  position: relative;
  margin-left: 7px;
  padding: 0 0 18px 30px;
  border-left: 2px dashed rgba(47, 111, 237, 0.34);
}

.tm-days li:last-child {
  padding-bottom: 0;
  border-left: 0;
}

.tm-days li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #2f6fed), var(--sky, #67b6e8));
  box-shadow: 0 0 0 4px #fff;
}

.tm-days b {
  display: block;
  color: var(--foreground, #172033);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.35;
}

.tm-days p {
  margin: 4px 0 0;
  color: var(--muted-foreground, #637083);
  font-size: 0.88rem;
  line-height: 1.55;
}

.tm-box {
  margin-bottom: 12px;
  padding: 15px 17px 16px;
  border: 1px solid var(--border, #e3eaf3);
  border-radius: 18px;
}

.tm-box:last-child {
  margin-bottom: 0;
}

.tm-box.inc {
  background: #f1fbf4;
  border-color: #d8f0df;
}

.tm-box.exc {
  background: #fff4f1;
  border-color: #f8ddd6;
}

.tm-box.car {
  background: #eef7ff;
  border-color: #d8eafb;
}

.tm-box h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  color: var(--foreground, #172033);
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.94rem;
  font-weight: 800;
}

.tm-box h4::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
}

.tm-box.inc h4::before {
  content: "✓";
  background: #188038;
}

.tm-box.exc h4::before {
  content: "×";
  background: #d93025;
}

.tm-box.car h4::before {
  content: "•";
  background: #2478c9;
}

.tm-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-box li {
  position: relative;
  padding-left: 1.35rem;
  color: #354253;
  font-size: 0.86rem;
  line-height: 1.45;
}

.tm-box li + li {
  margin-top: 0.38rem;
}

.tm-box li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
}

.tm-box.inc li::before {
  content: "✓";
  color: #188038;
}

.tm-box.exc li::before {
  content: "×";
  color: #d93025;
}

.tm-box.car li::before {
  content: "→";
  color: #2478c9;
}

.tm-foot {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 26px;
  border-top: 1px solid var(--border, #e3eaf3);
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tm-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: none;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cta, #f26a2e), #e24a1f);
  color: #fff;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 10px 22px -8px rgba(226, 74, 31, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tm-call svg {
  width: 18px;
  height: 18px;
}

.tm-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(226, 74, 31, 0.75);
}

.tm-foot-note {
  margin-left: auto;
  max-width: 330px;
  color: var(--muted-foreground, #637083);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .tm {
    padding: 10px;
  }

  .tm-card {
    max-height: 94vh;
    border-radius: 22px;
  }

  .tm-head {
    align-items: flex-start;
    gap: 14px;
    padding: 18px 56px 18px 18px;
  }

  .tm-head img {
    width: 92px;
    height: 82px;
    border-radius: 14px;
  }

  .tm-head h2 {
    font-size: 1.25rem;
  }

  .tm-head p {
    font-size: 0.86rem;
  }

  .tm-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 20px 18px;
  }

  .tm-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 18px;
  }

  .tm-call {
    width: 100%;
  }

  .tm-foot-note {
    margin-left: 0;
    max-width: none;
    text-align: center;
    font-size: 0.72rem;
  }
}
