:root {
  --schedule-primary: var(--primary-color, var(--color-blue-1, #3554d1));
  --schedule-text: var(--color-dark-1, #051036);
  --schedule-muted: var(--color-light-1, #697488);
  --schedule-border: #e9edf5;
  --schedule-red: #d93025;
}

.gotrip-header-schedule-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--schedule-primary);
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(53, 84, 209, 0.22);
}

.gotrip-header-schedule-btn:hover {
  color: #fff !important;
  opacity: 0.92;
}

.blog-breadcrumb a {
  display: inline-flex;
  align-items: center;
  color: var(--schedule-text);
  font-weight: 700;
}

.blog-breadcrumb .active span,
.blog-breadcrumb .active {
  color: var(--schedule-muted) !important;
  font-weight: 700;
}

.schedule-side-button {
  position: fixed;
  right: 0;
  top: 46%;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 46px;
  min-height: 172px;
  padding: 14px 10px;
  border-radius: 10px 0 0 10px;
  background: var(--schedule-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  box-shadow: 0 12px 26px rgba(53, 84, 209, 0.28);
  animation: schedule-side-pulse 1.8s infinite;
}

.schedule-side-button i {
  font-size: 18px;
  writing-mode: horizontal-tb;
}

.schedule-side-button:hover {
  color: #fff;
  animation: none;
  opacity: 0.94;
}

@keyframes schedule-side-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(53, 84, 209, 0.5);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(53, 84, 209, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(53, 84, 209, 0);
  }
}

.schedule-page {
  background: #f5f7fa;
  min-height: 70vh;
  padding-bottom: 48px;
}

.schedule-heading {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 8px;
}

.schedule-heading__breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--schedule-muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.schedule-heading__breadcrumb a {
  color: var(--schedule-text);
  text-decoration: none;
}

.schedule-heading__breadcrumb span:before {
  content: ">";
  margin-right: 9px;
  color: var(--schedule-primary);
}

.schedule-heading h1 {
  margin: 0;
  color: var(--schedule-text);
  font-size: 24px;
  font-weight: 800;
  text-align: center;
}

.schedule-flags {
  background: transparent;
  border-bottom: 0;
  padding: 18px 0 20px;
}

.schedule-flags__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.flag-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  min-height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--schedule-text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.flag-btn:hover,
.flag-btn.active {
  color: var(--schedule-primary);
  transform: translateY(-1px);
}

.schedule-flag-media {
  flex: 0 0 22px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 22px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(5, 16, 54, 0.12);
}

.schedule-flag-media--all,
.schedule-flag-media--text {
  background: #fff;
  color: var(--schedule-primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.schedule-filterbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.schedule-filterbar__inner {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--schedule-primary);
  box-shadow: 0 8px 20px rgba(53, 84, 209, 0.22);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.schedule-filterbar__count {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 0;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.schedule-filterbar__count strong {
  font-size: 22px;
}

.schedule-filterbar__inputs {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px auto 150px 180px;
  align-items: center;
  gap: 10px;
}

.sf-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #fff !important;
  border-radius: 8px;
  background: #fff !important;
  color: var(--schedule-text) !important;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.sf-input::placeholder {
  color: #9aa3b2 !important;
  font-weight: 500;
  opacity: 1;
}

.sf-input:hover {
  border-color: #dbe2f0 !important;
}

.sf-input:focus {
  border-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.sf-input--date {
  cursor: pointer;
}

.sf-arrow {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

/* Flatpickr: ngày đã chọn theo xanh GoTrip */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: var(--schedule-primary);
  border-color: var(--schedule-primary);
}

.flatpickr-day.inRange {
  background: #eef3ff;
  border-color: #eef3ff;
  box-shadow: -5px 0 0 #eef3ff, 5px 0 0 #eef3ff;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-weekday {
  color: var(--schedule-text);
}

.schedule-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 16px 42px;
}

.sc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px 190px;
  min-height: 120px;
  margin-bottom: 12px;
  border: 1px solid var(--schedule-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(5, 16, 54, 0.08);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sc-row:hover {
  box-shadow: 0 12px 26px rgba(5, 16, 54, 0.12);
  transform: translateY(-1px);
}

.sc-row.full {
  opacity: 0.82;
}

.sc-row__main,
.sc-row__dates,
.sc-row__prices {
  padding: 13px 16px;
}

.sc-row__main {
  min-width: 0;
}

.sc-row__dates {
  border-left: 1px solid #edf0f5;
  border-right: 1px solid #edf0f5;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 0 14px;
}

.sc-leg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sc-leg-sep {
  align-self: stretch;
  width: 1px;
  background: #edf0f5;
}

.sc-leg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sc-leg__label {
  color: var(--schedule-muted);
  font-size: 12px;
  font-weight: 700;
}

.sc-leg__label strong {
  color: var(--schedule-text);
  font-size: 13px;
}

.sc-leg__code {
  color: var(--schedule-primary);
  font-size: 11px;
  font-weight: 800;
}

.sc-leg__times {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sc-leg__times strong {
  color: var(--schedule-text);
  font-size: 13px;
}

.sc-air {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sc-air img {
  height: 18px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
}

.sc-air-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eef3ff;
  color: var(--schedule-primary);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.sc-air-code {
  color: var(--schedule-muted);
  font-size: 10px;
  font-weight: 800;
}

.sc-leg__route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--schedule-muted);
  font-size: 12px;
  font-weight: 800;
}

.sc-leg__route > span:first-child,
.sc-leg__route > span:last-child {
  color: var(--schedule-text);
}

.sc-leg__plane {
  flex: 1;
  position: relative;
  height: 1px;
  min-width: 26px;
  background: #d7deea;
}

.sc-leg__plane i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 3px;
  background: #fff;
  color: var(--schedule-primary);
  font-size: 12px;
}

.sc-row__prices {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.sc-line--top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.sc-code {
  color: var(--schedule-text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.sc-code:hover,
.sc-title:hover {
  color: var(--schedule-primary);
}

.sc-mobile-date {
  display: none;
  color: var(--schedule-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sc-title {
  display: -webkit-box;
  color: var(--schedule-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.36;
  text-decoration: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sc-line--meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.sc-badge,
.sc-doc {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.sc-badge--city {
  border-radius: 4px;
  background: var(--schedule-primary);
  color: #fff;
}

.sc-badge--dur {
  background: rgba(53, 84, 209, 0.08);
  color: var(--schedule-primary);
}

.sc-badge--cat {
  background: #eef8f1;
  color: #16804a;
}

.sc-badge--loc {
  background: #eef3ff;
  color: var(--schedule-primary);
}

.sc-line--docs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.sc-docs-label {
  color: var(--schedule-muted);
  font-size: 12px;
  font-weight: 700;
}

.sc-doc {
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.sc-doc--pdf {
  background: #d93025;
}

.sc-doc--word {
  background: #185abd;
}

.sc-doc:hover {
  color: #fff;
  opacity: 0.9;
}

.sc-date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.sc-date-item span {
  color: var(--schedule-muted);
  font-size: 12px;
  font-weight: 800;
}

.sc-date-item strong {
  color: var(--schedule-text);
  font-size: 15px;
}

.sc-flight-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--schedule-muted);
  font-size: 13px;
}

.sc-flight-line strong {
  color: var(--schedule-text);
}

.sc-airline {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f4f6fb;
  color: var(--schedule-primary);
  font-weight: 800;
}

.sc-price-item {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 7px;
}

.sc-price-value {
  color: var(--schedule-red);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.sc-price-value--infant {
  font-size: 13px;
}

.sc-price-label {
  color: var(--schedule-muted);
  font-size: 12px;
  font-weight: 800;
}

.sc-row__status {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #edf0f5;
  color: var(--schedule-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.sc-row__status--available {
  color: #1f9d58;
}

.schedule-loading,
.schedule-empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--schedule-muted);
}

.schedule-empty i {
  display: block;
  color: #d7dce7;
  font-size: 46px;
  margin-bottom: 12px;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  border: 3px solid #edf0f5;
  border-top-color: var(--schedule-primary);
  border-radius: 50%;
  animation: schedule-spin 0.8s linear infinite;
}

@keyframes schedule-spin {
  to {
    transform: rotate(360deg);
  }
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.pagination button,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #dfe4ee;
  border-radius: 6px;
  background: #fff;
  color: var(--schedule-text);
  font-size: 14px;
}

.pagination button {
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination span {
  border-color: transparent;
  color: var(--schedule-muted);
}

.pagination button:hover:not(:disabled),
.pagination button.active {
  background: var(--schedule-primary);
  border-color: var(--schedule-primary);
  color: #fff;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 991px) {
  .schedule-filterbar__inner {
    grid-template-columns: 1fr;
  }

  .schedule-filterbar__inputs {
    grid-template-columns: 1fr 1fr;
  }

  .sf-arrow {
    display: none;
  }

  .sc-row {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .sc-row__dates {
    display: none;
  }

  .sc-mobile-date {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .schedule-heading h1 {
    font-size: 21px;
  }

  .schedule-flags__inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    gap: 14px;
  }

  .flag-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .schedule-filterbar__inputs {
    grid-template-columns: 1fr;
  }

  .sc-row {
    grid-template-columns: 1fr;
  }

  .sc-row__prices {
    border-top: 1px solid #edf0f5;
  }

  .sc-price-item,
  .sc-row__status {
    justify-content: flex-start;
    text-align: left;
  }

  .schedule-side-button {
    top: auto;
    right: 14px;
    bottom: 88px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
    writing-mode: horizontal-tb;
  }

  .schedule-side-button span {
    display: none;
  }
}
