/* Routes / Booking pages
 * Styles moved from style.css (lines ~151–~996 and related route/booking blocks).
 * Scope: .route-page, .route-*, body.single-mt_routes, booking layout tweaks, .mt-booking-* overrides.
 */

/* Route single page meta line (khoảng cách, thời gian, giá từ) */
.route-page .route-content-wrapper {
  padding: 16px 16px 32px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.route-page .route-title {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 8px;
  text-align: center;
}

.route-page .route-trips-title {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 12px;
  text-align: left;
  position: relative;
  padding-left: 16px;
}

.route-page .route-trips-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #147078;
  border-radius: 2px;
}

.route-reviews {
  margin: 32px 0 0;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  text-align: left;
}

.route-reviews-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.route-reviews-head h2 {
  margin: 0;
  font-size: 20px;
  position: relative;
  padding-left: 16px;
}

.route-reviews-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #147078;
  border-radius: 2px;
}

.route-reviews-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #475569;
  font-size: 14px;
}

.route-reviews-score {
  font-size: 26px;
  font-weight: 700;
  color: #2563eb;
}

.route-reviews-label {
  font-weight: 600;
  color: #f97316;
}

.route-reviews-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 20px;
}

.route-reviews-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.route-reviews-sort select {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #f97316;
  background: #fff7ed;
  font-size: 13px;
}

.route-reviews-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-reviews-tags button {
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  color: #1f2937;
}

.route-reviews-tags button.is-active {
  border-color: #f97316;
  color: #f97316;
  background: #fff7ed;
}

.route-reviews-tags .route-review-open {
  border-color: #1d4ed8;
  color: #1d4ed8;
  background: #eff6ff;
}

.route-review-item {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

.route-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.route-review-header > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #64748b;
}

.route-review-header strong {
  color: #0f172a;
  font-size: 14px;
}

.route-review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.route-review-badge {
  margin-left: auto;
  background: #6366f1;
  color: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

.route-review-meta {
  margin: 8px 0;
  font-size: 13px;
  color: #6366f1;
}

.route-review-item p {
  margin: 0 0 8px;
  color: #334155;
  line-height: 1.6;
}

.route-review-more {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  padding: 6px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
}

.route-review-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.route-review-thumb {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
  height: 130px;
  overflow: hidden;
  border-radius: 8px;
  display: block;
  appearance: none;
}

.route-review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.route-review-gallery img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
}

.route-review-helpful {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1f2937;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 600;
}

.route-review-like-icon {
  width: 16px;
  height: 16px;
  fill: #1877f2;
}

.route-review-helpful-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.route-review-helpful-count {
  font-size: 13px;
  color: #475569;
}

.route-review-helpful-emoji {
  margin-right: 4px;
}

.route-review-notice {
  margin: 12px 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ecfeff;
  color: #0f172a;
  font-size: 14px;
}

.route-review-empty {
  padding: 16px;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  font-size: 14px;
  margin-top: 12px;
}

.route-review-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.route-review-page-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.route-review-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.route-review-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.route-review-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.route-review-modal-content {
  background: #ffffff;
  width: min(520px, 100%);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.route-review-modal-content h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.route-review-modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: #64748b;
}

.route-review-form {
  display: grid;
  gap: 12px;
}

.route-review-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  text-align: left;
}

.route-review-form-row label {
  text-align: left;
}

.route-review-anon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}

.route-review-anon input {
  margin: 0;
}

.route-review-form-row input,
.route-review-form-row textarea {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
}

.route-review-form-row span {
  color: #64748b;
  font-weight: 400;
}

.route-review-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.route-review-stars input {
  display: none;
}

.route-review-stars label {
  font-size: 22px;
  color: #e2e8f0;
  cursor: pointer;
  line-height: 1;
}

.route-review-stars label:hover,
.route-review-stars label:hover ~ label {
  color: #f59e0b;
}

.route-review-stars input:checked ~ label {
  color: #f59e0b;
}

.route-review-submit {
  border: none;
  background: #1d4ed8;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
}

body.route-review-modal-open {
  overflow: hidden;
}

.route-review-gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.route-review-gallery-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.route-review-gallery-modal-content {
  position: relative;
  background: #0f172a;
  border-radius: 16px;
  padding: 16px;
  width: min(860px, 100%);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
}

.route-review-gallery-main {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  background: #0f172a;
}

.route-review-gallery-thumbs {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.route-review-gallery-thumbs button {
  border: 2px solid transparent;
  background: transparent;
  padding: 0;
  flex: 0 0 64px;
  height: 64px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.route-review-gallery-thumbs button.is-active {
  border-color: #38bdf8;
}

.route-review-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.route-review-gallery-close,
.route-review-gallery-nav {
  position: absolute;
  top: 12px;
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.route-review-gallery-close {
  right: 12px;
}

.route-review-gallery-nav.prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.route-review-gallery-nav.next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .route-review-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .route-reviews {
    padding: 16px;
  }

  .route-reviews-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .route-reviews-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .route-review-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.route-meta-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  justify-content: center;
}

.route-meta-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #facc15;
  color: #0f172a;
  font-size: 13px;
}

.route-date-strip {
  margin: 16px 0 20px;
  padding: 8px 0 4px;
  display: flex;
  overflow-x: auto;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.route-date-strip::-webkit-scrollbar {
  height: 4px;
}

.route-date-strip::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.route-date-item {
  flex: 0 0 auto;
  min-width: 110px;
  padding: 10px 8px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: center;
  text-decoration: none;
  color: #0f172a;
  font-size: 13px;
}

.route-date-item .route-date-weekday {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.route-date-item .route-date-day {
  display: block;
  font-weight: 600;
}

.route-date-item .route-date-today {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #2563eb;
}

.route-date-item.is-active {
  background: #eef3ff;
  border-color: #2563eb;
}

.route-date-item.is-active .route-date-weekday,
.route-date-item.is-active .route-date-day {
  color: #0f172a;
}

/* Route 2-column layout: left trips, right stops */
.route-layout-two-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
}

.route-col-left,
.route-col-right {
  width: 100%;
}

body.single-mt_routes .route-col-left {
  text-align: left;
}

.route-stops-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: left;
  position: relative;
  padding-left: 16px;
}

.route-stops-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #147078;
  border-radius: 2px;
}

.route-stops-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  margin-bottom: 12px;
  text-align: left;
}

.route-stops-card h3 {
  font-size: 15px;
  margin: 0 0 8px;
}

.route-stops-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #334155;
}

.route-stops-card li + li {
  margin-top: 4px;
}

@media (min-width: 992px) {
  .route-layout-two-col {
    flex-direction: row;
    align-items: flex-start;
  }

  .route-col-left {
    flex: 2;
  }

  .route-col-right {
    flex: 1;
  }
}

/* Ẩn thanh tìm kiếm & bộ lọc khi danh sách chuyến nằm trong landing tuyến */
body.single-mt_routes .mt-booking-results-bar,
body.single-mt_routes .mt-booking-filters {
  display: none !important;
}

body.single-mt_routes .mt-booking-results-layout {
  grid-template-columns: 1fr;
}

/* Left column layout tweaks for route landing (match screenshot) */
body.single-mt_routes .route-col-left .mt-booking-tabs {
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

body.single-mt_routes .route-col-left .mt-booking-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #d7dfe8;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  background: #ffffff;
}

body.single-mt_routes .route-col-left .mt-booking-tab.active {
  background: #1a76a6;
  border-color: #1a76a6;
  color: #ffffff;
}

body.single-mt_routes .route-col-left .mt-booking-tab:hover {
  border-color: #1a76a6;
  color: #1a76a6;
}

body.single-mt_routes .route-col-left .mt-trip-stops::before {
  left: 6px;
}

body.single-mt_routes .route-col-left .mt-trip-stop-icon {
  width: 14px;
  text-align: center;
}

body.single-mt_routes .route-col-left .mt-trip-stop-icon img {
  width: 12px;
  height: 12px;
  vertical-align: middle;
}

body.single-mt_routes .route-col-left .mt-trip-stop-duration {
  font-size: 12px;
  color: #94a3b8;
  margin-left: 18px;
}

@media (max-width: 640px) {
  /* Bỏ layout 2 cột, dùng lại cấu trúc card giống /dat-ve/ */
  body.single-mt_routes .route-col-left .mt-trip-card {
    grid-template-columns: 1fr;
    padding: 16px 18px;
  }

  body.single-mt_routes .route-col-left .mt-trip-thumb,
  body.single-mt_routes .route-col-left .mt-trip-slider,
  body.single-mt_routes .route-col-left .mt-trip-slider img {
    width: 100%;
    height: 160px;
    border-radius: 16px;
  }
}

.route-reverse-link {
  margin-top: 12px;
  font-size: 14px;
}

.route-reverse-link a {
  color: rgb(var(--color-primary-hover));
  font-weight: 600;
  text-decoration: none;
}

.route-reverse-link a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .route-page .route-content-wrapper {
    max-width: 960px;
    margin: 24px auto 40px;
    padding: 0 16px 32px;
  }

  .route-page .route-title {
    font-size: 24px;
  }

  .route-meta-line {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Override booking search background to brand color */
.mt-booking-search {
  background: linear-gradient(180deg, #147078 0%, #8ed1fc 100%) !important;
}

.mt-booking-bar {
  background: linear-gradient(180deg, #8ed1fc 0%, #147078 100%) !important;
}

.mt-booking-bar-group label {
  color: #000000 !important;
}

.mt-booking-bar-submit {
  background: #e7b823 !important;
}

.mt-booking-bar-submit:hover {
  background: #d79f12 !important;
}

