.tm-my-travel-page {
  max-width: var(--content);
}

.tm-my-travel-page .tm-commerce__head,
.tm-my-travel-page .tm-my-travel-head {
  margin-bottom: 0;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--border);
}

.tm-my-travel-head h1 {
  font-size: 30px;
}

.tm-my-travel-head p {
  margin-top: 10px;
  font-size: 15px;
}

.tm-my-booking-list > div,
.tm-order-list > div {
  border-top: 0;
}

.tm-ticket {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(224px, 25%);
  gap: 0;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 7px 16px rgb(15 45 71 / 7%);
  overflow: visible;
}

.tm-ticket + .tm-ticket {
  margin-top: 18px;
}

.tm-ticket__journey {
  position: relative;
  min-width: 0;
  min-height: 222px;
  overflow: hidden;
  border-radius: 9px 0 0 9px;
  background: #123a62;
}

.tm-ticket__image,
.tm-ticket__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tm-ticket__image {
  object-fit: cover;
}
.tm-ticket__scrim {
  background: linear-gradient(
    90deg,
    rgb(5 36 67 / 94%) 0%,
    rgb(5 36 67 / 70%) 51%,
    rgb(5 36 67 / 20%) 100%
  );
}

.tm-ticket__body {
  position: relative;
  gap: 6px;
  z-index: 1;
  display: flex;
  min-height: 222px;
  flex-direction: column;
  justify-content: center;
  padding: 28px 36px;
  color: #ffffff;
}

.tm-ticket h2 {
  max-width: 660px;
  margin: 0;
  color: #ffffff;
  font-size: 23px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tm-ticket__offer {
  margin: 8px 0 0;
  color: rgb(255 255 255 / 88%);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.tm-ticket__dates,
.tm-ticket__ordered {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 18px 0 0;
  color: rgb(255 255 255 / 94%);
  font-size: 14px;
  line-height: 1.5;
}
.tm-ticket__ordered {
  margin-top: 6px;
  color: rgb(255 255 255 / 82%);
}
.tm-ticket__ordered span {
  margin-right: 7px;
}
.tm-ticket__ordered strong {
  font-weight: 500;
}

.tm-ticket__stub {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px 18px 25px;
  border-left: 5px dashed #c7d4df;
  border-radius: 0 9px 9px 0;
  background: #ffffff;
}

.tm-ticket__stub::before,
.tm-ticket__stub::after {
  position: absolute;
  left: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}
.tm-ticket__stub::before {
  top: -12px;
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg);
}
.tm-ticket__stub::after {
  bottom: -12px;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}
.tm-ticket__stub small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.tm-ticket__number {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.tm-ticket__status {
  width: fit-content;
  margin-top: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.tm-ticket[data-order-status="PENDING_PAYMENT"] .tm-status::before,
.tm-ticket[data-order-status="CONFIRMATION_PENDING"] .tm-status::before {
  background: var(--accent);
}
.tm-ticket[data-order-status="CONFIRMED"] .tm-status::before {
  background: #168563;
}
.tm-ticket[data-order-status="PAYMENT_FAILED"] .tm-status::before,
.tm-ticket[data-order-status="COMPLETION_FAILED"] .tm-status::before,
.tm-ticket[data-order-status="CANCELLED"] .tm-status::before {
  background: #d94b45;
}
.tm-ticket[data-order-status="EXPIRED"] .tm-status::before {
  background: #8a97a5;
}

.tm-ticket__payment {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.tm-ticket__payment strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  white-space: nowrap;
}
.tm-ticket__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.tm-ticket__link:hover {
  color: var(--accent-hover);
  background: transparent;
}
.tm-ticket__link span {
  display: inline-block;
  color: currentColor;
}

.tm-my-booking-list + .pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.tm-my-booking-list + .pagination-controls .page-btn {
  display: inline-flex;
  min-width: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}
.tm-my-booking-list + .pagination-controls .page-btn:hover:not(:disabled) {
  color: var(--accent-hover);
}
.tm-my-booking-list + .pagination-controls .page-btn.active {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}
.tm-my-booking-list + .pagination-controls .page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 767px) {
  .tm-my-travel-head {
    padding-bottom: 19px;
  }
  .tm-my-travel-head h1 {
    font-size: 26px;
  }
  .tm-ticket {
    grid-template-columns: 1fr;
    border-radius: 8px;
  }
  .tm-ticket__journey {
    min-height: 230px;
    border-radius: 7px 7px 0 0;
  }
  .tm-ticket__body {
    min-height: 230px;
    padding: 26px 24px;
  }
  .tm-ticket h2 {
    font-size: 20px;
  }
  .tm-ticket__dates {
    margin-top: 16px;
  }
  .tm-ticket__stub {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
    padding: 19px 24px 20px;
    border-top: 1px dashed #c7d4df;
    border-left: 0;
    border-radius: 0 0 7px 7px;
  }
  .tm-ticket__stub::before,
  .tm-ticket__stub::after {
    top: -12px;
    bottom: auto;
  }
  .tm-ticket__stub::before {
    left: -12px;
    transform: rotate(135deg);
  }
  .tm-ticket__stub::after {
    right: -12px;
    left: auto;
    transform: rotate(-45deg);
  }
  .tm-ticket__payment {
    min-width: 132px;
    padding-top: 0;
    border-top: 0;
    text-align: right;
  }
  .tm-ticket__link {
    justify-content: flex-end;
    margin-top: 10px;
  }
}

@media (max-width: 420px) {
  .tm-ticket__body {
    min-height: 218px;
    padding: 23px 20px;
  }
  .tm-ticket__dates,
  .tm-ticket__ordered {
    font-size: 13px;
  }
  .tm-ticket__stub {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    padding: 18px 20px;
  }
  .tm-ticket__payment {
    min-width: 0;
    text-align: left;
  }
  .tm-ticket__link {
    justify-content: flex-start;
  }
}
