:root {
  --hvrt-yellow: var(--hvr-yellow);
  --hvrt-yellow-strong: var(--hvr-yellow-dark);
  --hvrt-ink: var(--hvr-ink);
  --hvrt-muted: var(--hvr-muted);
  --hvrt-line: var(--hvr-line);
  --hvrt-soft: var(--hvr-soft);
  --hvrt-danger: var(--hvr-red);
  --hvrt-success: var(--hvr-green);
  --hvrt-white: var(--hvr-white);
  --hvrt-card-radius: 14px;
  --hvrt-control-radius: 10px;
}

body.hvrt-template > #main-menu.mobile-sidebar.mfp-hide {
  display: none !important;
}

.hvr-page.hvrt-page {
  --hvr-muted: #606369;
  --hvrt-muted: #606369;
  padding-bottom: 0;
}

.hvrt-workspace button,
.hvrt-workspace a,
.hvrt-search button,
.hvrt-search input,
.hvrt-search select {
  -webkit-tap-highlight-color: transparent;
}

.hvrt-workspace button:focus-visible,
.hvrt-workspace a:focus-visible,
.hvrt-search button:focus-visible,
.hvrt-search input:focus-visible,
.hvrt-search select:focus-visible {
  outline: 3px solid rgb(255 194 14 / 45%);
  outline-offset: 2px;
}

.hvrt-page [hidden] {
  display: none !important;
}

/* Booking actions keep a predictable hit area, independent of theme defaults.
   Seat-map cells are deliberately excluded from these button rules. */
.hvrt-workspace .hvr-button,
.hvrt-workspace .hvrt-text-button,
.hvrt-page .hvrt-search > .hvrt-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  height: auto;
  margin: 0;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: normal;
  overflow-wrap: break-word;
}

.hvr-sticky.hvrt-mobile-sticky {
  display: none;
}
@media (max-width: 560px) {
  .hvr-sticky.hvrt-mobile-sticky {
    display: grid;
  }
  .hvr-page.hvrt-page:has(> .hvrt-mobile-sticky) {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .hvrt-page:has([data-hvrt-seat-area]:not([hidden])) > .hvrt-mobile-sticky,
  .hvrt-page:has([data-hvrt-review]:not([hidden])) > .hvrt-mobile-sticky {
    display: none;
  }
}

.hvrt-page[data-booking-mode="one-way"].hvrt-inline-roundtrip .hvrt-progress { grid-template-columns: repeat(3,minmax(0,1fr)); }
.hvrt-page[data-south-inline="1"]:has([data-hvrt-seat-area]:not([hidden])) > .hvr-sticky,
.hvrt-page[data-south-inline="1"]:has([data-hvrt-review]:not([hidden])) > .hvr-sticky { display: none; }

.hvrt-pair-field select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.hvrt-page[data-booking-mode="one-way"] .hvrt-progress {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hvrt-fixed-direction,
.hvrt-reverse-link {
  grid-column: 1 / -1;
}

.hvrt-fixed-direction {
  font-size: 17px;
  line-height: 1.4;
}

.hvrt-reverse-link {
  display: flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  color: var(--hvrt-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hvrt-direction {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  margin: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
}

.hvrt-direction legend {
  float: left;
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  margin: 0;
  color: var(--hvr-gray);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hvrt-direction label {
  min-width: 0;
}

.hvrt-direction input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.hvrt-direction span {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--hvrt-line);
  border-radius: 8px;
  color: var(--hvr-gray);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  white-space: normal;
}

.hvrt-direction input:checked + span {
  border-color: var(--hvrt-yellow-strong);
  background: #fff8dd;
  color: var(--hvrt-ink);
  box-shadow: inset 0 0 0 1px var(--hvrt-yellow-strong);
}

.hvrt-direction input:focus-visible + span {
  outline: 3px solid rgb(255 194 14 / 45%);
  outline-offset: 2px;
}

.hvrt-primary:disabled,
.hvrt-secondary:disabled,
.hvrt-trip-select:disabled,
.hvrt-seat-action:disabled {
  border-color: var(--hvrt-line);
  background: var(--hvrt-soft);
  color: var(--hvrt-muted);
  cursor: not-allowed;
}

.hvrt-workspace {
  padding-block: 38px 70px;
}

.hvrt-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 700px;
  margin: 0 auto 24px;
}

.hvrt-progress button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 9px;
  border: 0;
  border-bottom: 3px solid var(--hvrt-line);
  background: transparent;
  color: var(--hvrt-muted);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

.hvrt-progress button:not(:disabled) {
  cursor: pointer;
}

.hvrt-progress button.is-active {
  border-bottom-color: var(--hvrt-yellow-strong);
  color: var(--hvrt-ink);
}

.hvrt-progress button.is-complete {
  border-bottom-color: var(--hvrt-success);
  color: var(--hvrt-success);
}

.hvrt-progress span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--hvrt-line);
  font-size: 12px;
}

.hvrt-progress .is-active span {
  background: var(--hvrt-yellow);
  color: #28230f;
}

.hvrt-progress .is-complete span {
  background: var(--hvrt-success);
  color: var(--hvrt-white);
}

.hvrt-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 24px;
}

.hvrt-main-panel,
.hvrt-summary {
  border: 1px solid var(--hvrt-line);
  border-radius: var(--hvrt-card-radius);
  background: var(--hvrt-white);
}

.hvrt-main-panel {
  min-width: 0;
  padding: 24px;
}

.hvrt-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.hvrt-panel-head h2,
.hvrt-summary h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.hvrt-panel-head p {
  margin: 7px 0 0;
  color: var(--hvrt-muted);
}

.hvrt-workspace .hvrt-text-button,
.hvrt-seat-head .hvrt-change-trip {
  border: 1px solid var(--hvrt-ink);
  border-radius: var(--hvrt-control-radius);
  background: var(--hvrt-white);
  color: var(--hvrt-ink);
  cursor: pointer;
  text-decoration: none;
}

.hvrt-workspace .hvrt-text-button:hover,
.hvrt-seat-head .hvrt-change-trip:hover {
  background: var(--hvrt-soft);
}

.hvrt-panel-head > div,
.hvrt-seat-head > div {
  min-width: 0;
}

.hvrt-status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--hvrt-control-radius);
  background: var(--hvrt-soft);
  color: var(--hvr-gray);
  font-size: 14px;
  font-weight: 700;
}

.hvrt-status.is-error {
  background: #fff1ed;
  color: var(--hvrt-danger);
}

.hvrt-results {
  display: grid;
  gap: 12px;
}

.hvrt-trip {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--hvrt-line);
  border-radius: var(--hvrt-card-radius);
  background: var(--hvrt-white);
}

.hvrt-trip:hover {
  border-color: #c5a442;
}

.hvrt-trip-media {
  overflow: hidden;
  width: 112px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: var(--hvrt-soft);
}

.hvrt-trip-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hvrt-trip-media span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--hvrt-muted);
  font-size: 12px;
  font-weight: 700;
}

.hvrt-trip-main {
  min-width: 0;
}

.hvrt-trip-main h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.hvrt-trip-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
  color: var(--hvrt-ink);
}

.hvrt-trip-time strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.hvrt-trip-time span,
.hvrt-trip-meta {
  color: var(--hvr-gray);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hvrt-trip-meta > span:nth-child(2) {
  color: #147345;
  font-size: 17px;
  font-weight: 700;
}

.hvrt-trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.hvrt-trip-side {
  display: grid;
  min-width: 145px;
  justify-items: end;
  gap: 9px;
}

.hvrt-trip-price {
  color: #8a6500;
  font-size: 22px;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.hvrt-skeleton {
  overflow: hidden;
  height: 116px;
  border-radius: var(--hvrt-card-radius);
  background: linear-gradient(100deg, #f5f5f6 20%, #fff 40%, #f5f5f6 60%);
  background-size: 200% 100%;
}

.hvrt-empty {
  padding: 36px 24px;
  border: 1px dashed var(--hvrt-line);
  border-radius: var(--hvrt-card-radius);
  color: var(--hvrt-muted);
  text-align: center;
}

.hvrt-seat-area {
  margin-top: 18px;
}

.hvrt-seat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--hvrt-card-radius);
  background: var(--hvrt-soft);
}

.hvrt-seat-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.hvrt-seat-head p {
  margin: 5px 0 0;
  color: var(--hvrt-muted);
  font-size: 13px;
}

.hvrt-seat-grid-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: start;
  gap: 18px;
}

.hvrt-seat-map {
  min-width: 0;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--hvrt-line);
  border-radius: var(--hvrt-card-radius);
  background: var(--hvrt-white);
}

.hvrt-vehicle-front {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
  color: var(--hvrt-muted);
  font-size: 12px;
  font-weight: 700;
}

.hvrt-cabin + .hvrt-cabin {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hvrt-line);
}

.hvrt-cabin h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.hvrt-seat-row {
  display: grid;
  grid-template-columns: repeat(var(--hvrt-seat-columns), minmax(60px, 84px));
  min-width: calc(var(--hvrt-seat-columns) * 60px + (var(--hvrt-seat-columns) - 1) * 6px);
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.hvrt-seat,
.hvrt-seat-space {
  min-width: 0;
  min-height: 84px;
}

.hvrt-seat {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 8px 2px;
  border: 2px solid var(--hvrt-seat-color, #c7a33a);
  border-radius: var(--hvrt-control-radius);
  background: var(--hvrt-white);
  color: var(--hvrt-ink);
  cursor: pointer;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

.hvrt-seat strong {
  font-size: 20px;
  font-weight: 700;
}

.hvrt-seat small {
  margin-top: 4px;
  color: var(--hvr-gray);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* Chỉ máy có chuột, và không đè ghế đã chọn: trên điện thoại :hover dính lại sau
   khi chạm, làm ghế vừa chọn trông như chưa chọn. */
@media (hover: hover) {
  .hvrt-seat:not(.is-selected):hover:not(:disabled) {
    background: #fff8dd;
  }
}

.hvrt-seat.is-selected {
  border-color: #725400;
  background: var(--hvrt-yellow);
  color: #28230f;
}

.hvrt-seat.is-selected small {
  color: #493800;
}

.hvrt-seat:disabled {
  border-color: var(--hvrt-line);
  background: var(--hvrt-soft);
  color: var(--hvrt-muted);
  cursor: not-allowed;
  opacity: .72;
}

.hvrt-seat-selection {
  position: sticky;
  top: 88px;
  padding: 18px;
  border: 1px solid var(--hvrt-line);
  border-radius: var(--hvrt-card-radius);
  background: var(--hvrt-white);
}

.hvrt-seat-selection h4 {
  margin: 0 0 12px;
  font-weight: 700;
}

.hvrt-seat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  margin-bottom: 14px;
}

.hvrt-seat-list span {
  padding: 5px 8px;
  border-radius: 8px;
  background: #fff3c7;
  color: #5d4700;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hvrt-seat-selection-total,
.hvrt-summary-total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 13px;
  border-top: 1px solid var(--hvrt-line);
}

.hvrt-seat-selection-total strong,
.hvrt-summary-total strong {
  color: #805f00;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.hvrt-seat-action {
  width: 100%;
  margin-top: 4px;
}

.hvrt-seat-note {
  margin: 10px 0 0;
  color: var(--hvrt-muted);
  font-size: 12px;
}

.hvrt-summary {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.hvrt-summary h2 {
  margin-bottom: 18px;
  font-size: 20px;
}

.hvrt-summary-leg {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: var(--hvrt-control-radius);
  background: var(--hvrt-soft);
}

.hvrt-summary-leg + .hvrt-summary-leg {
  margin-top: 10px;
}

.hvrt-summary-leg strong {
  font-size: 14px;
}

.hvrt-summary-leg span {
  color: var(--hvrt-muted);
  font-size: 13px;
  white-space: pre-line;
}

.hvrt-summary-total {
  margin-top: 14px;
}

.hvrt-summary > p {
  margin: 2px 0 0;
  color: var(--hvrt-muted);
  font-size: 12px;
}

.hvrt-review {
  padding: 24px;
  border: 1px solid #d5b44d;
  border-radius: var(--hvrt-card-radius);
  background: #fffaf0;
}

.hvrt-review h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.hvrt-review > p {
  max-width: 620px;
  margin: 10px 0 20px;
  color: var(--hvrt-muted);
}

.hvrt-review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hvrt-review-actions > .hvr-button {
  width: 100%;
}

.hvrt-review-actions > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.hvrt-review-message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--hvrt-control-radius);
  background: #eaf6ef;
  color: var(--hvrt-success);
  font-weight: 500;
}

@media (prefers-reduced-motion: no-preference) {
  .hvrt-trip {
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
  }

  .hvrt-skeleton {
    animation: hvrt-shimmer 1.25s linear infinite;
  }
}

@keyframes hvrt-shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1100px) {
  .hvrt-seat-grid-wrap {
    grid-template-columns: 1fr;
  }

  .hvrt-seat-selection {
    position: static;
  }

  .hvrt-trip {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .hvrt-trip-media {
    width: 96px;
  }

  .hvrt-trip-side {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    align-items: center;
    justify-items: start;
  }
}

@media (max-width: 900px) {
  .hvrt-workspace-grid {
    grid-template-columns: 1fr;
  }

  .hvrt-summary {
    position: static;
  }

  .hvrt-seat-grid-wrap {
    grid-template-columns: 1fr;
  }

  .hvrt-seat-selection {
    position: static;
  }
}

@media (max-width: 700px) {
  .hvrt-workspace {
    padding-block: 28px 48px;
  }

  .hvrt-progress button {
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
  }

  .hvrt-main-panel {
    padding: 17px;
  }

  .hvrt-panel-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .hvrt-text-button {
    justify-self: stretch;
    width: 100%;
  }

  .hvrt-trip {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .hvrt-trip-media {
    width: 82px;
  }

  .hvrt-trip-main h3 {
    font-size: 16px;
  }

  .hvrt-trip-time strong {
    font-size: 22px;
  }

  .hvrt-trip-side {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    align-items: center;
    justify-items: start;
  }

  .hvrt-seat-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .hvrt-seat-head .hvrt-change-trip {
    justify-self: stretch;
    width: 100%;
  }

  .hvrt-seat-map {
    overflow-x: auto;
    padding: 13px;
  }

  .hvrt-trip-select {
    width: 100%;
  }

  .hvrt-seat strong {
    font-size: 18px;
  }

  .hvrt-review {
    padding: 18px;
  }

  .hvrt-review-actions {
    grid-template-columns: minmax(0, 1fr);
  }

}

.hvrt-seat-row-rear {
  grid-template-columns: repeat(var(--hvrt-seat-columns), minmax(46px, 84px));
  min-width: calc(var(--hvrt-seat-columns) * 46px + (var(--hvrt-seat-columns) - 1) * 4px);
  gap: 4px;
}

[data-hvr-shared-handoff] .hvr-booking-overlay-notice,
[data-hvr-shared-handoff] .hvr-booking-overlay-summary {
  font-size: 14px;
  line-height: 1.5;
}

.hvrt-page[data-sleeper="1"] .hvr-route-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 390px) {
  .hvrt-trip {
    grid-template-columns: 1fr;
  }

  .hvrt-trip-media {
    width: 100%;
    max-height: 150px;
  }

  .hvrt-trip-side {
    grid-column: auto;
  }
}

/* Ô đổi ngày về ở đầu bước chọn chuyến về. */
.hvrt-stage-date { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 700; }
.hvrt-stage-date[hidden] { display: none; }
.hvrt-stage-date input { min-height: 44px; padding: 4px 10px; border-radius: 10px; border: 1px solid #d8d2c6; font: inherit; font-size: 15px; background: #fff; color: #2e2f31; }

/* Giá trên màn xác nhận hai chiều: gạch giá niêm yết, nổi giá khứ hồi đã giảm. */
.hvrt-review-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; background: #fff8e1; border: 1px solid rgb(255 194 14 / 55%); }
.hvrt-review-price > span { font-weight: 700; white-space: nowrap; }
.hvrt-review-price > strong { margin-left: auto; font-size: 20px; text-align: right; white-space: nowrap; }
.hvrt-review-price > small { flex: 1 1 100%; font-size: 13px; font-weight: 700; color: #6b5300; }
.hvrt-review-price .hvc-was, .hvrt-summary-total .hvc-was { font-size: .8em; font-weight: 600; color: #8a8278; margin-right: 4px; }

