:root {
  --color-header: #1a466c;
  --color-accent: #255d88;
  --color-bg-light: #f1f1f1;
  --color-white: #ffffff;
  --color-text-dark: #1a466c;
  --color-border: rgba(255, 255, 255, 0.2);
  --font-family: 'Tajawal', 'Cairo', sans-serif;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-white);
  color: var(--color-text-dark);
  min-height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  direction: rtl;
}

.book-container {
  width: 100%;
  min-height: 100vh;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header */
.book-header {
  background-color: var(--color-header);
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-btn {
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-decoration: none;
}

.back-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--color-white);
}

.header-title {
  font-size: 1.2rem;
  font-weight: 700;
  flex-grow: 1;
  text-align: center;
  margin-left: 40px; /* Offset the back button to center title */
}

/* Trip Type Selector */
.trip-type-selector {
  background-color: var(--color-accent);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.trip-type-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-speed);
  flex-grow: 1;
  text-align: center;
}

.trip-type-btn.active {
  background-color: var(--color-header);
  color: var(--color-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.swap-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--color-white);
  transition: transform var(--transition-speed);
}

.swap-btn:active svg {
  transform: rotate(180deg);
}

/* Station Selector */
.station-selector {
  background-color: var(--color-header);
  padding: 16px 20px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.select-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  position: relative;
}

.select-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 400;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
  color: var(--color-white);
  font-family: var(--font-family);
  font-size: 1rem;
  padding: 8px 0 8px 24px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.custom-select option {
  background-color: var(--color-header);
  color: var(--color-white);
}

.select-arrow {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--color-white);
  pointer-events: none;
}

/* Date Picker Section */
.date-pickers-container {
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-light);
  border-bottom: 1.5px solid #e0e0e0;
}

.date-picker-section {
  background-color: transparent;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  flex-grow: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.date-picker-section:last-child {
  border-bottom: none;
}

.date-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
}

.date-picker-native {
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--color-text-dark);
  font-weight: 500;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 4px 0;
  width: 100%;
}

.date-picker-section svg {
  width: 20px;
  height: 20px;
  fill: #888;
}

/* Passengers Section */
.passengers-section {
  background-color: var(--color-white);
  padding: 24px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.passengers-title {
  color: var(--color-text-dark);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.passengers-row {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 32px; /* Increased gap for clear spacing */
  margin-bottom: 40px;
}

.passenger-stepper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px; /* Slightly tighter vertical gap for clean look */
  flex: 1;
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stepper-btn {
  width: 26px; /* Decreased size */
  height: 26px; /* Decreased size */
  border-radius: 50%;
  background-color: var(--color-text-dark);
  border: none;
  color: var(--color-white);
  font-size: 0.95rem; /* Smaller font */
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--transition-speed);
}

.stepper-btn:hover {
  opacity: 0.9;
}

.stepper-btn:active {
  transform: scale(0.95);
}

.stepper-value-circle {
  width: 26px; /* Decreased size */
  height: 26px; /* Decreased size */
  border-radius: 50%;
  background-color: var(--color-text-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem; /* Smaller font */
  font-weight: 700;
}

.passenger-icon {
  width: 36px; /* Decreased icon size */
  height: 36px; /* Decreased icon size */
  fill: var(--color-text-dark);
}

.passenger-subtitle {
  font-size: 0.7rem; /* Smaller subtitle font */
  color: #777;
  text-align: center;
  margin-top: 4px;
  line-height: 1.25;
}

/* Search Button Container */
.search-container {
  padding: 24px 20px 40px 20px;
  display: flex;
  justify-content: center;
  background-color: var(--color-white);
}

.search-circle-btn {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: var(--color-header);
  color: var(--color-white);
  border: 1px dashed var(--color-white);
  outline: 8px solid rgba(26, 70, 108, 0.08);
  font-family: var(--font-family);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(26, 70, 108, 0.25);
  transition: all var(--transition-speed);
}

.search-circle-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 30px rgba(26, 70, 108, 0.35);
}

.search-circle-btn:active {
  transform: scale(0.96);
}

/* Responsive adjustments for all screen sizes (Full Screen) */
@media (min-width: 601px) and (max-width: 1024px) {
  /* Tablet / iPad */
  .book-header {
    height: 70px;
    padding: 0 32px;
  }
  .header-title {
    font-size: 1.35rem;
  }
  .trip-type-selector {
    padding: 16px 32px;
  }
  .station-selector {
    padding: 24px 32px;
  }
  .date-pickers-container {
    flex-direction: row;
  }
  .date-picker-section {
    padding: 16px 32px;
    border-bottom: none;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
  }
  .date-picker-section:last-child {
    border-left: none;
  }
  .passengers-section {
    padding: 32px;
  }
  .passenger-stepper {
    gap: 16px;
  }
  .stepper-btn, .stepper-value-circle {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
  .passenger-icon {
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 1025px) {
  /* Desktop / Laptop */
  .book-header {
    height: 80px;
    padding: 0 80px;
  }
  .header-title {
    font-size: 1.5rem;
  }
  .trip-type-selector {
    padding: 20px 80px;
    justify-content: center;
    gap: 40px;
  }
  .trip-type-btn {
    max-width: 250px;
  }
  .station-selector {
    padding: 32px 80px;
    gap: 40px;
  }
  .date-pickers-container {
    flex-direction: row;
    padding: 0 80px;
  }
  .date-picker-section {
    padding: 20px 24px;
    border-bottom: none;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
  }
  .date-picker-section:first-child {
    padding-right: 0;
  }
  .date-picker-section:last-child {
    border-left: none;
    padding-left: 0;
  }
  .passengers-section {
    padding: 40px 80px;
    align-items: center;
  }
  .passengers-title {
    font-size: 1.35rem;
    align-self: flex-start;
  }
  .passengers-row {
    max-width: 800px;
    width: 100%;
    justify-content: space-around;
    gap: 40px;
  }
  .stepper-btn, .stepper-value-circle {
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
  }
  .passenger-icon {
    width: 48px;
    height: 48px;
  }
  .search-container {
    padding-top: 40px;
  }
  .search-circle-btn {
    width: 100px;
    height: 100px;
    font-size: 1.35rem;
  }
}

/* ============================================================
   Time Slot Cards & Date Input Styling
   ============================================================ */
.ticket-type-tabs {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.ticket-tab {
  flex: 1;
  height: 45px;
  border-radius: 6px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-family);
  background-color: #F5F5F8;
  color: #1a466c;
  transition: all 0.2s ease;
}

.ticket-tab.active {
  background-color: #1a466c;
  color: #ffffff;
}

.date-input-field-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid #CCCCCC;
  border-radius: 6px;
  height: 52px;
  padding: 0 16px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.date-input-field-custom .date-text-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111111;
  font-weight: bold;
}

.date-input-field-custom .date-text-wrapper svg {
  width: 20px;
  height: 20px;
  stroke: #174B5B;
  fill: none;
  stroke-width: 2.5;
}

.date-input-field-custom .clear-btn {
  background: #E2E8F0;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111111;
  font-size: 0.8rem;
  font-weight: bold;
}

.time-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
}

.time-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  min-height: 74px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
  width: 100%;
}

.time-card:hover {
  border-color: #A0AEC0;
}

.time-card.selected {
  border-color: #1a466c;
  border-width: 2px;
  background-color: rgba(26, 70, 108, 0.03);
}

.time-card-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.time-card-name {
  font-weight: 800;
  color: #1a466c;
  font-size: 1.1rem;
}

.time-card-price {
  font-size: 0.9rem;
  color: #E53E3E;
  font-weight: 700;
}

.time-card-hours {
  color: #2D3748;
  font-size: 1rem;
  font-weight: 600;
  direction: ltr;
}

.seats-pill {
  background-color: rgba(26, 70, 108, 0.08);
  color: #1a466c;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#btn-search {
  background-color: #FFFFFF !important;
  color: #1a466c !important;
  border: 2px solid #1a466c !important;
  opacity: 0.6;
  cursor: not-allowed;
}

#btn-search.active {
  opacity: 1 !important;
  cursor: pointer !important;
}

#btn-search.active:hover {
  background-color: #1a466c !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(26, 70, 108, 0.2) !important;
}

