/* Booking page only (matches your theme) */

/* =========================
   BASE
========================= */
.booking-section{
  background: #f7f7f7;
}

/* ✅ Wider container on large screens (only inside booking section) */
@media (min-width: 1200px){
  .booking-section .container{ max-width: 1200px; }
}
@media (min-width: 1400px){
  .booking-section .container{ max-width: 1320px; }
}

.booking-card{
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
}

.booking-title{
  font-family: "Brygada 1918", serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2.2rem);
  line-height: 1.2;
}

/* =========================
   INPUTS
========================= */
.booking-section .form-control,
.booking-section .form-select{
  min-height: 46px;
  border-radius: 10px;
  font-size: 1rem;          /* 16px */
  padding: 0.5rem 0.75rem;
}

.booking-section .form-label{
  margin-bottom: 0.35rem;
}

/* Slightly smaller inputs on phones */
@media (max-width: 576px){
  .booking-section .form-control,
  .booking-section .form-select{
    font-size: 0.95rem;
  }
}

/* Card padding nicer on phones */
@media (max-width: 575.98px){
  .booking-card .p-4{
    padding: 1.25rem !important;
  }
}

/* =========================
   AUTOCOMPLETE DROPDOWN
========================= */
.autocomplete-list{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #111827;
  border: 1px solid #334155;
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
}

.autocomplete-item{
  padding: 10px 14px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
}

.autocomplete-item:hover{
  background: #f6c10b;
  color: #111;
}

/* =========================================
   PORTS ROW (From + Swap + To)
========================================= */
.ports-row{
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: nowrap;
  min-width: 0;
}

.port-field{
  flex: 1 1 0;
  min-width: 0;
}

.port-field .autocomplete-list{
  width: 100%;
}

/* Long labels (FR/AR) */
.port-field .form-label{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Airport values: clean truncation */
.ports-row .form-control{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* =========================================
   SWAP BUTTON
========================================= */
.swap-airports-btn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
  user-select: none;
  flex: 0 0 auto;
  margin-bottom: 2px;
}

.swap-airports-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.swap-airports-btn:active{
  transform: translateY(0);
}

.swap-airports-btn .swap-icon{
  display: inline-block;
  transition: transform .2s ease;
}

.swap-airports-btn:active .swap-icon{
  transform: rotate(180deg);
}

@media (max-width: 575.98px){
  .ports-row{ gap: 10px; }
  .swap-airports-btn{
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* =========================================
   DATES ROW (Departure + Return)
   ✅ Always one line
   ✅ Never overflow card
========================================= */
.dates-row{
  display: flex;
  gap: 14px;
  flex-wrap: nowrap;
  align-items: flex-end;
  min-width: 0;
}

.date-field{
  flex: 1 1 0;
  min-width: 0;
}

/* allow <input type="date"> to shrink */
.date-field input{
  width: 100%;
  min-width: 0;
}

.dates-row .form-label{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 575.98px){
  .dates-row{ gap: 10px; }
}

/* =========================
   RTL FIX (Arabic) ✅ REAL FIX
   - DO NOT use row-reverse (it flips fields wrongly)
   - Use direction: rtl on the flex row so order stays correct
   - Keep airport/date values LTR (Latin text)
========================= */

/* Make booking section RTL look correct */
[dir="rtl"] .booking-section{
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Keep the same DOM order, but start from the right side */
[dir="rtl"] .ports-row,
[dir="rtl"] .dates-row{
  direction: rtl;          /* ✅ From stays on the right, To on the left */
}

/* Labels / normal fields align right */
[dir="rtl"] .booking-section .form-label{
  text-align: right;
}

[dir="rtl"] .booking-section .form-control,
[dir="rtl"] .booking-section .form-select{
  text-align: right;
}

/* ✅ IMPORTANT: airport + date values are Latin -> keep them LTR so they don't get "cut weird" */
[dir="rtl"] #from,
[dir="rtl"] #to,
[dir="rtl"] input[type="date"]{
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: right;       /* looks natural in Arabic UI */
}

/* Autocomplete list text in RTL */
[dir="rtl"] .autocomplete-list{
  text-align: right;
}

/* ✅ FIX Bootstrap select arrow in RTL (your green circles issue) */
[dir="rtl"] .booking-section .form-select{
  /* Bootstrap uses padding-right for the arrow in LTR. Swap it. */
  padding-right: 0.75rem;
  padding-left: 2.25rem;

  /* Move the arrow to the LEFT side */
  background-position: left 0.75rem center;
}

/* ===== Airline-style timeline bar (TK/RAM style) ===== */
.itin-bar {
  margin: 10px 0 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}

.itin-bar-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.itin-side {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.itin-time {
  font-size: 18px;
  font-weight: 800;
}

.itin-code {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .3px;
  opacity: .9;
}

.itin-mid {
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
}

.itin-line {
  width: 100%;
  height: 2px;
  background: rgba(0,0,0,0.22);
  border-radius: 999px;
  position: relative;
}

.itin-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.28);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.itin-dot.left { left: 0%; }
.itin-dot.right { left: 100%; }

.itin-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.itin-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.1);
  white-space: nowrap;
}

.itin-dur {
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
}

.itin-plusday {
  font-weight: 800;
  color: #d11;
  margin-left: 6px;
  font-size: 12px;
}

@media (max-width: 576px) {
  .itin-time { font-size: 16px; }
  .itin-code { font-size: 15px; }
}

/* ==========================================
   FLIGHT DETAILS TIMELINE
========================================== */
.fd-timeline {
  margin-top: 10px;
  padding: 8px 6px;
}

.fd-node {
  display: grid;
  grid-template-columns: 120px 34px 1fr;
  column-gap: 10px;
  align-items: start;
  position: relative;
}

.fd-left .fd-time {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
}

.fd-left .fd-city {
  margin-top: 2px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.fd-mid {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fd-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.35);
  background: #fff;
  margin-top: 2px;
}

.fd-line {
  width: 2px;
  flex: 1;
  min-height: 26px;
  background: rgba(0,0,0,0.15);
  margin-top: 6px;
}

.fd-right .fd-airport {
  font-weight: 700;
}

.fd-right .fd-terminal {
  color: rgba(0,0,0,0.6);
  font-size: 13px;
  margin-top: 2px;
}

.fd-between,
.fd-layover {
  display: grid;
  grid-template-columns: 120px 34px 1fr;
  column-gap: 10px;
  align-items: start;
  margin: 6px 0 10px;
}

.fd-between-left {
  color: rgba(0,0,0,0.75);
  font-weight: 700;
  padding-top: 4px;
}

.fd-between-line {
  width: 2px;
  height: 100%;
  background: rgba(0,0,0,0.15);
  margin: 0 auto;
}

.fd-meta {
  font-weight: 600;
  color: rgba(0,0,0,0.75);
}

.fd-meta-strong {
  font-weight: 800;
}

.fd-submeta {
  color: rgba(0,0,0,0.55);
  margin-top: 2px;
}

.fd-layover-title {
  font-weight: 800;
  color: rgba(0,0,0,0.7);
}

.fd-layover-sub {
  color: rgba(0,0,0,0.55);
  margin-top: 2px;
}

@media (max-width: 576px) {
  .fd-node,
  .fd-between,
  .fd-layover {
    grid-template-columns: 92px 30px 1fr;
  }
  .fd-left .fd-time {
    font-size: 16px;
  }
}

.iata-tip {
  cursor: help;
  font-weight: 700;
  text-decoration: underline dotted rgba(0,0,0,0.25);
  text-underline-offset: 3px;
}

.airport-tip-bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 9999;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  pointer-events: none;
}

/* =========================================
   DIRECT FLIGHTS ONLY - styled like input
========================================= */
.direct-only-field{
  min-height: 46px;                 /* same as inputs */
  border-radius: 10px;              /* match your inputs */
  border: 1px solid rgba(0,0,0,0.12) !important;
  background: #fff;
  padding: 0.5rem 0.75rem;          /* match form-control padding */
  display: flex;
  align-items: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* Hover effect */
.direct-only-field:hover{
  border-color: rgba(15,141,136,0.55) !important;
}

/* Nice focus when checkbox is focused */
.direct-only-field:focus-within{
  border-color: rgba(15,141,136,0.75) !important;
  box-shadow: 0 0 0 .2rem rgba(15,141,136,0.15);
}

/* Checkbox styling */
.direct-only-field .form-check-input{
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

/* Make label look clean */
.direct-only-field .form-check-label{
  cursor: pointer;
  user-select: none;
  line-height: 1.2;
}

/* RTL: keep spacing natural */
[dir="rtl"] .direct-only-field .form-check{
  flex-direction: row-reverse;
}

/* =========================
   WhatsApp Premium Modal
========================= */

.wa-modal {
  border-radius: 18px;
  overflow: hidden;
  border: none;
}

.wa-modal-header {
  background: #f8f9fa;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wa-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.wa-icon {
  color: #25d366;
  font-size: 20px;
}

.wa-name {
  font-weight: 600;
  font-size: 16px;
}

.wa-modal-main {
  padding: 30px 25px 20px;
  text-align: center;
}

.wa-status {
  margin-bottom: 15px;
}

.wa-check {
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  font-size: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.wa-title {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
}

.wa-sub {
  color: #6c757d;
  font-size: 14px;
}

.wa-modal-footer {
  padding: 15px 20px 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.wa-btn {
  border-radius: 50px;
  padding: 8px 18px;
}

.wa-btn-primary {
  background: #25d366;
  color: white;
  border: none;
}

.wa-btn-primary:hover {
  background: #1ebe5d;
}

.wa-close {
  opacity: 0.6;
}
