/* Layout Wrappers */
.afb-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.afb-offer-group {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 30px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.afb-main-offer {
  margin-bottom: 10px;
}

.afb-segments {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}

.afb-segments li {
  font-size: 14px;
  margin-bottom: 4px;
}

/* Price Box */
.afb-price-badge {
  border: 2px solid #2563eb;
  color: #2563eb;
  padding: 6px 12px;
  border-radius: 5px;
  background: transparent;
  font-weight: bold;
  display: inline-block;
}

/* Buttons */
.afb-result .button,
.afb-modal .button,
.afb-toggle-more {
  font-size: 14px;
  padding: 8px 16px;
  font-weight: bold;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  display: inline-block;
}

.afb-result .button {
  background: #f97316;
  color: white;
}

.afb-toggle-more {
  background: #2563eb;
  color: white;
}

.afb-filter-button,
.afb-sort-button {
  font-weight: bold;
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 16px;
}

/* Logo */
.afb-logo {
  max-height: 40px;
  margin-bottom: 10px;
}

/* Nested Offers */
.afb-more-offer {
  background: #f9f9f9;
  padding: 12px;
  border-left: 4px solid #2563eb;
  border-radius: 5px;
  margin-top: 10px;
}

/* Modals */
.afb-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.afb-modal-content {
  background: #fff;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.afb-summary-box {
  border: 2px solid #f97316;
  padding: 20px;
  border-radius: 6px;
  margin-top: 25px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.afb-summary-box h2,
.afb-summary-box h3 {
  color: #f97316;
  margin-bottom: 10px;
}

.afb-summary-box ul {
  padding-left: 20px;
  list-style: disc;
}

.afb-summary-box .button {
  background: #f97316;
  color: #fff;
  border: none;
  padding: 8px 20px;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
}

.afb-passenger-wrapper {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  max-width: 700px;
  margin: 0 auto;
}

.afb-field {
  margin-bottom: 15px;
}

.afb-field input,
.afb-field select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.afb-fieldset {
  border: 1px solid #eee;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.afb-summary-box {
  border: 2px solid #f97316;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  margin-top: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.afb-summary-box h2,
.afb-summary-box h3 {
  color: #f97316;
  margin-bottom: 10px;
}

.afb-summary-box ul {
  padding-left: 20px;
  margin-top: 10px;
}

.afb-passenger-card {
  border: 1px solid #ddd;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 5px solid #f97316;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.afb-passenger-card legend {
  font-weight: bold;
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

.afb-passenger-card p {
  margin-bottom: 15px;
}

.afb-passenger-card label {
  display: block;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

.afb-passenger-card input,
.afb-passenger-card select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.afb-passenger-card input[type="date"] {
  padding: 6px 10px;
}

.afb-passenger-card select {
  background-color: #fff;
}

button[type="submit"].button.alt {
  background: #f97316;
  border: none;
  padding: 12px;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: none;
  transition: 0.3s ease-in-out;
}

button[type="submit"].button.alt:hover {
  background: #e25f08;
}

.afb-thankyou-summary {
  border: 2px solid #f97316;
  border-radius: 8px;
  padding: 20px;
  margin: 30px 0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.afb-thankyou-summary h2 {
  color: #f97316;
  font-size: 20px;
  margin-bottom: 10px;
}

.afb-thankyou-summary p {
  margin: 6px 0;
  font-size: 15px;
  color: #333;
}

.afb-thankyou-summary ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.afb-thankyou-summary li {
  margin-bottom: 4px;
  color: #555;
}

/* ========================
   Flight Results Styling
   ======================== */

/* Top Bar Buttons */
.afb-results-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.afb-results-bar button {
  padding: 10px 15px;
  border: none;
  background: #eee;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
}

/* Flight Card Buttons */
.afb-offer-footer .button:first-child {
  background: #f97316;
  color: #fff;
  border: none;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px; /* space between View Detail and More Offers */
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
}

.afb-offer-footer .afb-toggle-more {
  background: transparent;
  color: #2563eb;
  border: 2px solid #2563eb;
  width: 100%;
  padding: 12px;
  font-weight: bold;
  border-radius: 6px;
}

/* Offer Card Structure */
.afb-offer-group {
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Responsive Layout */
@media (max-width: 768px) {
  .afb-results-bar {
    justify-content: center;
  }

  .afb-main-offer,
  .afb-more-offer {
    padding: 15px;
  }

  .afb-offer-footer .button,
  .afb-offer-footer .afb-toggle-more {
    width: 100% !important;
    display: block;
  }

  .afb-segments li {
    font-size: 14px;
  }

  .afb-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
  }
}

/* ========================
   Flight Results Styling
   ======================== */

/* Top Bar Buttons */
.afb-results-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.afb-results-bar button {
  padding: 10px 15px;
  border: none;
  background: #eee;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
}

/* Flight Card Buttons */
.afb-offer-footer .button:first-child {
  background: #f97316;
  color: #fff;
  border: none;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px; /* space between View Detail and More Offers */
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
}

.afb-offer-footer .afb-toggle-more {
  background: transparent;
  color: #2563eb;
  border: 2px solid #2563eb;
  width: 100%;
  padding: 12px;
  font-weight: bold;
  border-radius: 6px;
}

/* Offer Card Structure */
.afb-offer-group {
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Responsive Layout */
@media (max-width: 768px) {
  .afb-results-bar {
    justify-content: center;
  }

  .afb-main-offer,
  .afb-more-offer {
    padding: 15px;
  }

  .afb-offer-footer .button,
  .afb-offer-footer .afb-toggle-more {
    width: 100% !important;
    display: block;
  }

  .afb-segments li {
    font-size: 14px;
  }

  .afb-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
  }
}

/* Step Progress Bar */
.afb-progress {
  list-style: none;
  display: flex;
  justify-content: space-between;
  margin: 20px auto 30px;
  padding: 0;
  max-width: 800px;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
}

.afb-progress li {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-weight: bold;
  color: #6b7280;
  background: #e5e7eb;
}

.afb-progress li.done {
  background: #10b981; /* Green */
  color: white;
}

.afb-progress li.active {
  background: #2563eb; /* Royal Blue */
  color: white;
}

/* Offer Buttons */
.button.primary {
  background: #f97316;
  color: #fff;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  padding: 12px 18px;
}

.button.secondary {
  background: transparent;
  color: #2563eb;
  border: 2px solid #2563eb;
  font-weight: bold;
  border-radius: 6px;
  padding: 12px 18px;
  display: inline-block;
}

/* Sticky Footer */
.afb-sticky-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #2563eb;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  padding: 12px 0;
  z-index: 999;
}

.afb-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: right;
  padding: 0 20px;
}

.afb-sticky-footer .button.secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

/* Results Bar Buttons */
.afb-results-bar {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  flex-wrap: wrap;
  margin: 25px 0;
}

.afb-results-bar button {
  width: 150px;
  padding: 12px;
  font-weight: bold;
  font-size: 15px;
  border-radius: 6px;
  border: 2px solid #2563eb;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
}

/* Offer Group Container */
.afb-offer-group {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Segment List */
.afb-segments {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}

.afb-segments li {
  font-size: 14px;
  margin-bottom: 4px;
}

/* Offer Footer Button Layout */
.afb-offer-footer {
  margin-top: 10px;
}

.afb-offer-footer .button {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

/* Airline Logo */
.afb-logo {
  max-height: 40px;
  margin-bottom: 10px;
}

/* Nested Offer Expansion */
.afb-more-offer {
  background: #f9f9f9;
  padding: 12px;
  border-left: 4px solid #2563eb;
  border-radius: 5px;
  margin-top: 10px;
}

/* Modals */
.afb-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.afb-modal-content {
  background: #fff;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.afb-offer-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.afb-offer-route {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-weight: bold;
  color: #333;
}

.afb-offer-route .from,
.afb-offer-route .to {
  font-size: 18px;
}

.afb-offer-route .duration {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.afb-offer-price {
  font-size: 18px;
  font-weight: bold;
  color: #2563eb;
}