/**

 * Amadex Frontend Styles

 */



/* Container */

.amadex-flight-search-container {

    /*max-width: 100%;

    margin: 0 auto 30px;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

    color: #333;

    border-radius: 8px;

    overflow: hidden;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/

}



/* Themes */

.amadex-theme-light {

    /*background-color: #f8f9fa;

    border: 1px solid #ddd;*/

}



.amadex-theme-dark {

    background-color: #333;

    color: #f8f9fa;

    border: 1px solid #222;

}



.amadex-theme-dark .amadex-flight-search-header {

    background-color: #222;

    display:none;

}



/* Header */

.amadex-flight-search-header {

    padding: 15px 20px;

    background-color: #f1f1f1;

    border-bottom: 1px solid #ddd;

     display:none;

}



.amadex-flight-search-title {

    margin: 0;

    font-size: 18px;

    font-weight: 600;

}



/* Form Container */

.amadex-flight-search-form-container {

    /* padding: 20px; */

}



/* Form */

.amadex-flight-search-form {

    display: block;

}



.amadex-form-row {

    display: flex;

    flex-wrap: wrap;

    margin: 0 -10px 15px;

}



.amadex-form-group {

    flex: 1 1 calc(50% - 20px);

    margin: 0 10px 15px;

    position: relative;

}



.amadex-form-group label {

    display: block;

    font-weight: 500;

    margin-bottom: 8px;

}



.amadex-form-group input,

.amadex-form-group select {

    width: 100%;

    padding: 10px;

    border: 1px solid #ddd;

    border-radius: 4px;

    font-size: 14px;

    line-height: 1.5;

    box-sizing: border-box;

}



.amadex-form-help {

    display: block;

    font-size: 12px;

    color: #777;

    margin-top: 5px;

}



.amadex-form-submit {

    display: flex;

    align-items: flex-end;

}



.amadex-search-button {

    background-color: #1B59AA;

    color: white;

    padding: 10px 20px;

    border: none;

    border-radius: 4px;

    font-size: 14px;

    font-weight: 500;

    cursor: pointer;

    transition: background-color 0.2s ease;

}



.amadex-search-button:hover {

    background-color: #005a87;

}



/* Autocomplete Wrapper */

.amadex-autocomplete-wrapper {

    position: relative;

    width: 100%;

}



/* Autocomplete Results Container */

.amadex-autocomplete-results {

    position: absolute;

    z-index: 9999;

    top: 100%;

    left: 0;

    right: 0;

    background: white;

    border: 1px solid #ddd;

    border-top: none;

    max-height: 250px;

    overflow-y: auto;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    display: none;

    border-radius: 0 0 4px 4px;

}



.amadex-theme-dark .amadex-autocomplete-results {

    background: #444;

    border-color: #555;

    color: #eee;

}



/* Autocomplete Item */

.amadex-autocomplete-item {

    padding: 10px 15px;

    cursor: pointer;

    border-bottom: 1px solid #eee;

}



.amadex-theme-dark .amadex-autocomplete-item {

    border-color: #555;

}



.amadex-autocomplete-item:last-child {

    border-bottom: none;

}



.amadex-autocomplete-item:hover {

    background-color: #f5f5f5;

}



.amadex-theme-dark .amadex-autocomplete-item:hover {

    background-color: #333;

}



/* No Results Message */

.amadex-no-results,

.amadex-loading-results,

.amadex-error-results {

    padding: 10px 15px;

    font-style: italic;

    color: #777;

}



.amadex-theme-dark .amadex-no-results,

.amadex-theme-dark .amadex-loading-results,

.amadex-theme-dark .amadex-error-results {

    color: #bbb;

}



.amadex-error-results {

    color: #d9534f;

}



/* Loading indicator */

.amadex-loading {

    text-align: center;

    padding: 20px;

}



.amadex-spinner {

    display: inline-block;

    width: 40px;

    height: 40px;

    border: 4px solid rgba(0, 115, 170, 0.2);

    border-radius: 50%;

    border-top-color: #1B59AA;

    animation: amadex-spin 1s ease-in-out infinite;

    margin-bottom: 10px;

}



@keyframes amadex-spin {

    to { transform: rotate(360deg); }

}



/* Flight Results */

.amadex-flight-results {

    padding: 20px;

}



.amadex-results-header {

    margin-bottom: 20px;

}



.amadex-results-header h2 {

    margin: 0;

    font-size: 24px;

    font-weight: 600;

}



/* Flight Cards */

.amadex-flight-cards {

    display: flex;

    flex-direction: column;

    gap: 20px;

}



.amadex-flight-card {

    position: relative;

    border: 1px solid #ddd;

    border-radius: 8px;

    overflow: hidden;

    background-color: white;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

    padding: 20px;

    margin-bottom: 15px;

}



.amadex-theme-dark .amadex-flight-card {

    background-color: #444;

    border-color: #555;

}



.amadex-price-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: #1B59AA;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;

}



.amadex-flight-summary {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;

}



.amadex-flight-price {

    font-size: 18px;

    font-weight: 600;

    color: #1B59AA;

}



.amadex-flight-code {

    font-size: 14px;

    color: #666;

}



.amadex-theme-dark .amadex-flight-code {

    color: #ccc;

}

.amadex-itinerary-footer {
    display: flex;
    gap: 20px;
    position: relative;
}

.amadex-select-flight {
    /* display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background-color: #1B59AA;
    color: white;
    border: none;
    border-radius: 250px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;

    text-align: center; */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1B59AA;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    border:1px solid #1B59AA;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 14px;
}



.amadex-select-flight:hover {

    background-color: #005a87;

}



/* Responsive styles */

@media (max-width: 768px) {

    .amadex-form-row {

        flex-direction: column;

    }

    

    .amadex-form-group {

        flex: 1 1 100%;

        margin: 0 0 15px 0;

    }

}





/* === Flight Search One-line Layout === */

.amadex-flight-search-form {

  display: grid;

  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 0.6fr 160px;

  gap: 16px;

  align-items: start; /* align everything at top */

  padding: 18px;

  background: #ffffff;

  border-radius: 12px;

  box-shadow: 0 2px 10px rgba(0,0,0,0.08);

  margin-bottom: 24px;

}



/* Flatten rows */

.amadex-form-row {

  display: contents;

  margin: 0 !important;

}



/* Each field container */

.amadex-form-group {

  display: flex;

  flex-direction: column;

  gap: 6px;

  margin: 0 !important;

}



/* Labels */

.amadex-form-group label {

  font-size: 13px;

  font-weight: 600;

  color: #333;

}



/* Inputs / Selects */

.amadex-form-group input,

.amadex-form-group select {

  width: 100%;

  padding: 12px 14px;

  font-size: 15px;

  border: 1px solid #ccc;

  border-radius: 8px;

  transition: border 0.2s, box-shadow 0.2s;

  background-color: #fafafa;

}



/* Focus effect */

.amadex-form-group input:focus,

.amadex-form-group select:focus {

  outline: none;

  border-color: #0077b6;

  box-shadow: 0 0 0 2px rgba(0,119,182,0.2);

  background-color: #fff;

}



/* Button */

.amadex-form-submit {

  display: flex;

  flex-direction: column;

  justify-content: flex-start; /* align top */

}



.amadex-form-submit .amadex-search-button {

  /* height: 46px; */
  width: 100%;
  /* padding: 0 18px; */
  /* font-size: 16px; */
  /* font-weight: 600; */
  /* color: #fff; */
  /* background: #0077b6; */

    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    background-color: #1B59AA;
    font-family: "Urbanist", Sans-serif;
    font-size: 15px;
    font-weight: 600;
    fill: #FFFFFF;
    color: #FFFFFF;
    border-style: solid;
    border-width: 5px 5px 5px 5px;
    border-color: #FFFFFF;
    border-radius: 250px;
    padding: 15px;
    text-transform: capitalize;
}



.amadex-form-submit .amadex-search-button:hover {
  background: #006FFF;
}

.amadex-form-submit .amadex-search-button:active {
  transform: scale(0.97);
}



/* Autocomplete styling */

.amadex-autocomplete-results {

  background: #fff;

  border: 1px solid #ccc;

  border-radius: 0 0 8px 8px;

  box-shadow: 0 2px 8px rgba(0,0,0,0.1);

  margin-top: -1px;

  max-height: 250px;

  overflow-y: auto;

}



/* Responsive */

@media (max-width: 1200px) {

  .amadex-flight-search-form {

    grid-template-columns: 1fr 1fr 1fr;

  }

  .amadex-form-submit { grid-column: span 3; }

}



@media (max-width: 768px) {

  .amadex-flight-search-form {

    grid-template-columns: 1fr;

  }

  .amadex-form-submit { grid-column: auto; }

}

/* =========================
   MODERN FLIGHT RESULT CARD
   ========================= */

.amadex-flight-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.amadex-flight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.12);
}

/* Route Summary */
.amadex-route-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #ccc;
}

.amadex-departure-info,
.amadex-arrival-info {
  text-align: center;
  min-width: 90px;
}

.amadex-airport-code {
  font-size: 22px;
  font-weight: 700;
  color: #1B59AA;
}

.amadex-time {
  font-size: 16px;
  font-weight: 600;
  margin: 4px 0;
  color: #333;
}

.amadex-date {
  font-size: 13px;
  color: #777;
}

/* Middle flight info (timeline) */
.amadex-flight-info {
  flex: 1;
  text-align: center;
  position: relative;
}

.amadex-duration {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.amadex-stops {
  font-size: 12px;
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  background: #ffebeb;
  color: #ff0000;
}

.amadex-flight-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.amadex-line {
  flex: 1;
  height: 2px;
  background: #ccc;
}

.amadex-stop {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff0000;
  margin: 0 6px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffcccc;
}

/* === Price Badge === */
.amadex-price-badge {
  font-size: 18px;
  font-weight: 700;
  color: #1B59AA;
  padding: 6px 12px;
  border: 1px solid #1B59AA;
  border-radius: 8px;
  background: #f4f7fc;
}

/* === Show/Hide Button === */
.amadex-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #1B59AA;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #1B59AA;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 14px;
}

.amadex-details-toggle:hover {
  background: #1B59AA;
  color: #fff;
}

.amadex-details-toggle::after {
  content: "▼";
  font-size: 12px;
  transition: transform 0.2s ease;
}

.amadex-details-toggle.active::after {
  transform: rotate(180deg);
}

/* === Segment Details (accordion) === */
.amadex-segments-details {
  display: none;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
  animation: fadeSlide 0.3s ease;
}

@keyframes fadeSlide {
  from {opacity: 0; transform: translateY(-6px);}
  to {opacity: 1; transform: translateY(0);}
}

.amadex-segment {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #ddd;
}

.amadex-segment:last-child {
  border-bottom: none;
}

.amadex-airline {
  font-size: 14px;
  font-weight: 600;
  color: #1B59AA;
}

.amadex-segment-details {
  font-size: 13px;
  color: #444;
  text-align: right;
}

/* === Flight Info Timeline === */
.amadex-flight-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

/* Horizontal line with stops */
.amadex-flight-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  /* max-width: 220px; */
  position: relative;
}

/* Line segments */
.amadex-line {
  flex: 1;
  height: 1px;
  background: #000;
  position: relative;
}

/* Circles at ends */
.amadex-line:first-child::before,
.amadex-line:last-child::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 50%;
}

.amadex-line:first-child::before { left: -5px; }
.amadex-line:last-child::after { right: -5px; }

/* Stops badge (Direct / 1 stop etc.) */
.amadex-stops {
  position: absolute;
  top: 25px;
  background: #008000;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Duration text */
.amadex-duration {
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  color: #111;
}
