/* Routiva / Transfer Booking Frontend CSS */

.tbfw-booking-form {
  --tbfw-yellow: #f7c952;
  --tbfw-yellow-dark: #efbd35;
  --tbfw-blue: #26384f;
  --tbfw-text: #2f3440;
  --tbfw-muted: #727987;
  --tbfw-border: #e6e7eb;
  --tbfw-soft: #f7f7f8;

  width: 100%;
  max-width: 1120px;
  margin: 0 auto 50px;
  padding: 0 16px;
  color: var(--tbfw-text);
  font-family: inherit;
}

.tbfw-booking-form *,
.routiva-section * {
  box-sizing: border-box;
}

.tbfw-booking-form select,
.tbfw-booking-form input,
.tbfw-booking-form button {
  max-width: 100%;
}

.tbfw-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tbfw-calculator-card,
.tbfw-booking-step {
  background: #fff;
  border: 1px solid var(--tbfw-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .11);
  padding: 26px 30px 32px;
}

.tbfw-calculator-card h2,
.tbfw-booking-step h2 {
  margin: 0;
  color: #333842;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}

.tbfw-title-line {
  width: 310px;
  max-width: 80%;
  height: 2px;
  margin: 10px auto 24px;
  background: var(--tbfw-yellow);
}

.tbfw-route-row {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) 50px minmax(260px, 1fr) 140px !important;
  grid-template-areas: "from swap to calc" !important;
  gap: 20px !important;
  align-items: end !important;
}

.tbfw-route-row > * {
  min-width: 0;
}

.tbfw-route-row label:first-of-type {
  grid-area: from !important;
}

.tbfw-route-row .tbfw-swap {
  grid-area: swap !important;
}

.tbfw-route-row label:nth-of-type(2) {
  grid-area: to !important;
}

.tbfw-route-row .tbfw-calculate {
  grid-area: calc !important;
}

.tbfw-calculator-card .tbfw-route-row {
  min-height: 0 !important;
}

.tbfw-route-row label,
.tbfw-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: #313947;
  font-size: 14px;
  font-weight: 800;
}

.tbfw-route-row label span,
.tbfw-grid label span {
  color: #c43d3d;
}

.tbfw-route-row select,
.tbfw-grid select,
.tbfw-grid input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px;
  height: 48px;
  border: 1px solid var(--tbfw-border);
  border-radius: 8px;
  background: #f8f8f9;
  padding: 9px 12px;
  color: var(--tbfw-text);
  font-size: 15px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.tbfw-route-row select:focus,
.tbfw-grid input:focus,
.tbfw-grid select:focus {
  border-color: var(--tbfw-yellow-dark);
  box-shadow: 0 0 0 3px rgba(247, 201, 82, .25);
}

.tbfw-swap {
  width: 50px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #344155;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  align-self: end;
  justify-self: center;
}

.tbfw-calculate,
.tbfw-submit {
  min-height: 48px;
  height: 48px;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--tbfw-yellow) !important;
  color: #263040 !important;
  font-weight: 850 !important;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, opacity .16s ease;
}

.tbfw-calculate {
  width: 100%;
  height: 48px;
  align-self: end;
}

.tbfw-calculate:hover,
.tbfw-submit:not(:disabled):hover {
  background: var(--tbfw-yellow-dark) !important;
  transform: translateY(-1px);
}

.tbfw-submit:disabled {
  background: #d9dde5 !important;
  color: #828998 !important;
  cursor: not-allowed;
  transform: none;
}

.tbfw-calculator-note {
  max-width: 650px;
  margin: 18px auto 0;
  color: #2d3849;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.tbfw-results-section {
  border-top: 1px solid #eceef2;
  padding-top: 18px;
}

.tbfw-results-count {
  margin: 0 0 14px;
  color: #333842;
  font-size: 14px;
  font-weight: 700;
}

.tbfw-vehicles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
}

.tbfw-vehicles > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border-radius: 10px;
  background: var(--tbfw-soft);
  color: var(--tbfw-muted);
}

.tbfw-result-card {
  display: grid;
  grid-template-columns: 76px minmax(110px, 1fr) minmax(120px, 1.2fr) 112px;
  align-items: stretch;
  min-height: 74px;
  overflow: hidden;
  border-radius: 7px;
  background: #f5f5f6;
  border: 1px solid transparent;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tbfw-result-card:hover {
  border-color: #d9dde5;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  transform: translateY(-1px);
}

.tbfw-result-card.is-selected {
  border-color: var(--tbfw-yellow-dark);
  box-shadow: 0 0 0 3px rgba(247, 201, 82, .28);
}

.tbfw-car-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: #f1f2f4;
}

.tbfw-car-icon img {
  width: 56px;
  height: 44px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.tbfw-car-info,
.tbfw-route-info,
.tbfw-price-select {
  padding: 14px 10px;
}

.tbfw-car-info strong {
  display: block;
  margin-bottom: 10px;
  color: #343b48;
  font-size: 15px;
  font-weight: 850;
}

.tbfw-car-meta {
  display: flex;
  gap: 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.tbfw-route-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-left: 1px solid #e3e5e9;
  color: #404653;
  font-size: 13px;
}

.tbfw-price-select {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  background: #ececec;
}

.tbfw-price-select strong {
  color: #2f3440;
  font-size: 15px;
  font-weight: 900;
}

.tbfw-select-vehicle {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: #5279ae;
  text-decoration: underline;
  font-weight: 850;
  cursor: pointer;
  padding: 0;
}

.tbfw-select-vehicle:disabled,
.tbfw-result-card.is-sold-out {
  opacity: .55;
  cursor: not-allowed;
}

.tbfw-booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: start;
}

.tbfw-selected-vehicle {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  padding: 10px 0 26px;
  border-bottom: 1px solid #edf0f3;
}

.tbfw-big-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  font-size: 72px;
}

.tbfw-big-icon img {
  width: 145px;
  height: 92px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.tbfw-selected-vehicle h3 {
  margin: 0 0 10px;
  color: #333842;
  font-size: 22px;
  font-weight: 850;
}

.tbfw-selected-vehicle p {
  margin: 0;
  color: #2f3948;
  font-weight: 700;
}

.tbfw-trip-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px !important;
  color: #3e4653 !important;
  font-size: 15px;
}

.tbfw-booking-fields {
  padding-top: 20px;
}

.tbfw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 42px;
  margin-bottom: 22px;
}

.tbfw-route-fields {
  padding-bottom: 20px;
  border-bottom: 1px solid #edf0f3;
}

.tbfw-booking-fields small {
  display: block;
  margin-top: 6px;
  color: #697386;
  font-size: 12px;
}

.tbfw-summary {
  position: sticky;
  top: 24px;
  padding: 18px 16px 16px;
  border: 1px solid #d6d7da;
  border-radius: 8px;
  background: #f6f6f7;
}

.tbfw-summary p {
  margin: 0 0 8px;
  color: #353b47;
  font-size: 13px;
}

.tbfw-summary hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid #e1e2e5;
}

.tbfw-summary span {
  display: block;
  margin-bottom: 6px;
  color: #3c4350;
  font-size: 13px;
}

.tbfw-summary-price {
  display: block;
  margin-bottom: 16px;
  color: #2d333d;
  font-size: 18px;
  font-weight: 900;
}

.tbfw-summary .tbfw-submit {
  width: 100%;
}

.tbfw-return-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eef0f4;
}

.tbfw-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #5d6677;
  font-weight: 600;
}

.tbfw-checkbox-label input {
  width: auto !important;
}

.tbfw-return-box > input[disabled] {
  width: 100%;
  background: #f7f8fb;
  color: #8a94a6;
}

.tbfw-policy-boxes {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.tbfw-policy-box h4 {
  margin: 0 0 5px;
  color: #38435a;
  font-size: 16px;
  font-weight: 800;
}

.tbfw-policy-box p {
  margin: 0;
  color: #687386;
  line-height: 1.45;
}

.tbfw-policy-box:first-child h4:before {
  content: 'ⓘ';
  margin-right: 6px;
  color: #29a36a;
}

.tbfw-policy-box:last-child h4:before {
  content: 'ⓧ';
  margin-right: 6px;
  color: #e24d4d;
}

/* Routiva content blocks */

.routiva-section {
  width: 100%;
  max-width: 1120px;
  margin: 60px auto;
  padding: 0 16px;
  transform: none;
  color: #303948;
}

.routiva-section h2 {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
}

.routiva-section-desc {
  max-width: 760px;
  margin: 26px 0 28px;
  color: #697386;
  font-size: 15px;
  line-height: 1.55;
}

.routiva-popular-row {
  display: grid;
  grid-template-columns: 235px 40px 1fr 40px;
  gap: 18px;
  background: #f3f3f3;
  border-radius: 8px;
  padding: 18px;
  margin: 20px 0;
  align-items: stretch;
}

.routiva-popular-vehicle {
  position: relative;
  min-height: 185px;
  background: #f6cd62;
  border-radius: 8px;
  padding: 22px 18px;
  overflow: hidden;
}

.routiva-popular-vehicle:after {
  content: "";
  position: absolute;
  right: -40px;
  top: 0;
  width: 90px;
  height: 100%;
  background: #f3f3f3;
  transform: skewX(-12deg);
  z-index: 1;
}

.routiva-popular-vehicle h3,
.routiva-fleet-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 800;
}

.routiva-icons {
  display: flex;
  gap: 14px;
  align-items: center;
  font-weight: 700;
  color: #303948;
  font-size: 14px;
}

.routiva-vehicle-cutout {
  position: absolute;
  right: -8px;
  bottom: 10px;
  width: 170px;
  height: 110px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.routiva-vehicle-cutout img,
.routiva-fleet-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.routiva-vehicle-cutout span {
  font-size: 70px;
}

.routiva-popular-nav {
  background: #fff;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b95a5;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  min-height: 185px;
  cursor: pointer;
  transition: .16s ease;
}

.routiva-popular-nav:not(:disabled):hover {
  color: #303948;
  background: #fff8e6;
  transform: translateY(-1px);
}

.routiva-popular-nav:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.routiva-route-card[hidden] {
  display: none !important;
}

.routiva-popular-routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.routiva-route-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 88px;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  text-decoration: none !important;
  color: #303948 !important;
  box-shadow: none;
  transition: .18s ease;
}

.routiva-route-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16,24,40,.08);
}

.routiva-route-card strong {
  font-size: 14px;
  border-bottom: 1px solid #eef0f3;
  padding-bottom: 12px;
  line-height: 1.25;
}

.routiva-route-card span {
  font-size: 18px;
  font-weight: 900;
  margin-top: 10px;
}

.routiva-fleet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 26px;
}

.routiva-fleet-card {
  background: #fff;
  border-radius: 9px;
  padding: 22px 20px;
  min-height: 230px;
  box-shadow: 0 1px 0 rgba(16,24,40,.04);
  overflow: hidden;
}

.routiva-fleet-image {
  height: 135px;
  margin-top: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.routiva-fleet-image span {
  font-size: 78px;
}

/* Responsive */

@media (max-width: 980px) {
  .routiva-popular-row {
    grid-template-columns: 210px 32px 1fr 32px;
    gap: 12px;
  }

  .routiva-popular-routes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .routiva-fleet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .tbfw-route-row {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "from"
      "swap"
      "to"
      "calc" !important;
  }

  .tbfw-booking-layout,
  .tbfw-selected-vehicle {
    grid-template-columns: 1fr !important;
  }

  .tbfw-swap {
    justify-self: center;
    transform: rotate(90deg);
  }

  .tbfw-vehicles {
    grid-template-columns: 1fr;
  }

  .tbfw-summary {
    position: static;
  }
}

@media (max-width: 680px) {
  .routiva-section {
    padding: 0 12px;
  }

  .routiva-popular-row {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .routiva-popular-nav {
    display: none;
  }

  .routiva-popular-routes,
  .routiva-fleet-grid {
    grid-template-columns: 1fr;
  }

  .routiva-popular-vehicle {
    min-height: 180px;
  }

  .routiva-popular-vehicle:after {
    display: none;
  }
}

@media (max-width: 640px) {
  .tbfw-booking-form {
    margin: 0 auto 28px;
  }

  .tbfw-calculator-card,
  .tbfw-booking-step {
    padding: 22px 16px;
  }

  .tbfw-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tbfw-result-card {
    grid-template-columns: 64px 1fr;
  }

  .tbfw-route-info,
  .tbfw-price-select {
    grid-column: 1 / -1;
    border-left: 0;
  }

  .tbfw-price-select {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}