/* HIA Destination Map — frontend styles */

.map-container {
  position: relative;
}

#hia-destination-map {
  height: 585px;
  border-radius: 21px;
}

.header {
  /* background: #001a45; */
}

.hia-flight-map {
  margin-bottom: 2.5rem;
}

.hia-flight-map label {
  color: white;
  width: 100%;
}

.hia-flight-map input.form-control,
.hia-flight-map select.form-control {
  background-color: #cce8f2;
  border-radius: 4px;
  height: 34px;
  line-height: 34px;
  color: #001a45;
  font-family: "Lato", calibri, sans-serif;
}

.hia-flight-map .col-lg-3 {
  padding-left: 6px;
  padding-right: 6px;
}

.hia-flight-map .row {
  margin-top: 12px;
  margin-bottom: 12px;
}

.gm-style .gm-style-iw {
  text-align: center;
}

#airline {
  padding-left: 12px;
}

.hia-flight-map .vertical-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hia-flight-map .map-container {
  position: relative;
  overflow: hidden;
}

.hia-flight-map #destination-view {
  border-top: 3px solid #001a45;
}

.hia-flight-map #destination-view .destinations {
  padding: 0;
}

.hia-flight-map #destination-view .destinations .destination {
  white-space: normal;
  border-bottom: 1px solid #001a45;
  font-family: calibri, "Lato", sans-serif;
  text-align: center;
  padding: 20px;
}

.hia-flight-map #destination-view .destinations .destination:last-of-type {
  border: 0;
  margin-right: 0;
}

.hia-flight-map #destination-view .destinations .destination .logo {
  height: 50px;
}

.hia-flight-map #destination-view .destinations .destination .logo a {
  height: 100%;
}

.hia-flight-map #destination-view .destinations .destination .logo img {
  max-height: 100%;
}

.hia-flight-map #destination-view .destinations .destination h3 {
  font-size: 22px;
  font-weight: bold;
  color: #001a45;
  margin-top: 10px;
  margin-bottom: 0;
  font-family: calibri, "Lato", sans-serif;
}

.hia-flight-map #destination-view .destinations .destination p {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 16px;
  font-family: calibri, "Lato", sans-serif;
}

.hia-flight-map #destination-view .destinations .destination p.description {
  line-height: 1.1;
}

.hia-flight-map #destination-view .destinations .destination p.flight-type {
  margin-bottom: 10px;
}

.hia-flight-map #destination-view .close {
  display: none;
  font-size: 28px;
  line-height: 1;
  font-weight: bold;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.hia-flight-map .form-controls {
  display: flex;
  justify-content: center;

  .region-control-wrapper {
    select {
      width: 100%;
    }
  }
}

/* Responsive */

@media (min-width: 801px) and (max-width: 1000px) {
  .hia-flight-map .col-lg-3 {
    width: 25%;
    display: inline-block;
  }
}

@media (max-width: 800px) {
  .hia-flight-map .container {
    width: 100%;
  }

  .header {
    padding: 20px;
  }

  .hia-flight-map .row {
    margin-top: 0;
  }

  .hia-flight-map .form-controls > div:not(:last-child) {
    margin-bottom: 15px;
  }

  #wrapper #main .destination {
    width: 100%;
  }
}

@media (min-width: 801px) {
  .form-controls {
    padding-left: 30px;
  }
}

@media (min-width: 800px) {
  .hia-flight-map #destination-view {
    width: 100%;
    position: absolute;
    bottom: -50px;
    background: rgba(202, 231, 241, 0.9);
    height: 25%;
    opacity: 0;
    pointer-events: none;
    -webkit-transition: all 0.4s;
    transition: all 0.4s;
  }

  .hia-flight-map #destination-view.visible {
    opacity: 1;
    pointer-events: all;
    bottom: 0;
    -webkit-transition: all 0.4s;
    transition: all 0.4s;
  }

  .hia-flight-map #destination-view .destinations {
    overflow: auto;
    overflow-y: hidden;
    margin: 0 auto;
    white-space: nowrap;
    height: 100%;
    padding: 20px;
  }

  .hia-flight-map #destination-view .destinations .destination {
    display: inline-block;
    height: 100%;
    overflow: hidden;
    float: none;
    border-right: 1px solid #001a45;
    border-bottom: 0;
    padding: 0 20px;
  }

  .hia-flight-map #destination-view .destinations .destination .logo {
    height: 30px;
  }

  .hia-flight-map #destination-view .close {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #001a45;
    opacity: 1;
    z-index: 10;
    text-shadow: unset;
    filter: alpha(opacity=100);
  }
}

.region-control-wrapper {
  position: relative;
}

/* ── Trigger (closed state) ───────────────────────────────────────── */
.custom-select {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.custom-select:hover .custom-select__trigger {
  border-color: #aaaaaa;
}

.custom-select:focus,
.custom-select.is-open .custom-select__trigger {
  outline: none;
  border-color: #0e7fa8;
  /* box-shadow: 0 0 0 3px rgba(14, 127, 168, 0.15); */
}

.custom-select__arrow {
  flex-shrink: 0;
  margin-left: 10px;
  color: #1a1a1a;
  transition: transform 0.2s ease;
}

.custom-select.is-open .custom-select__arrow {
  transform: rotate(180deg);
}

/* ── Dropdown list ────────────────────────────────────────────────── */
.custom-select__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow-y: auto;
}

.custom-select.is-open .custom-select__dropdown {
  display: block;
}

/* ── Options ──────────────────────────────────────────────────────── */
.custom-select__option {
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 400;
  color: #1a1a1a;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.custom-select__option:hover {
  background-color: #f0f7fa;
}

.custom-select__option--selected {
  font-weight: 600;
  color: #ffffff;
  background-color: #0e7fa8;
}

.custom-select__option--selected:hover {
  background-color: #0c6e93;
}

/* ── Popup container ───────────────────────────────────────────────────── */
#destination-view {
  display: none;
  position: absolute; /* coordinates written by positionPopup() */
  z-index: 10;
  width: 290px;
  pointer-events: none; /* let clicks pass through when hidden */
}

#destination-view.visible {
  display: block;
  pointer-events: auto;
}

/* ── Card shell ────────────────────────────────────────────────────────── */
.dv-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  font-family: inherit;
}

/* ── Hero image ────────────────────────────────────────────────────────── */
.dv-hero {
  position: relative;
  height: 150px;
}

.dv-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Close button ──────────────────────────────────────────────────────── */
.dv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #001a45;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.2s;

  span {
    margin-top: -2px;
  }
}

.dv-close:hover {
  background: #fff;
}

/* ── Body ──────────────────────────────────────────────────────────────── */
.dv-body {
  padding: 18px 20px 22px;
}

/* ── Tags ──────────────────────────────────────────────────────────────── */
.dv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dv-tag {
  border: 1.5px solid #007aa9;
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 11px;
  color: #007aa9;
  background: #fff;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ── Title & subtitle ──────────────────────────────────────────────────── */
.dv-title {
  font-size: 30px !important;
  font-weight: 800;
  color: #001a45;
  margin: 0 0 4px;
  line-height: 1.15;
}

.dv-subtitle {
  font-size: 14px;
  color: #2e7bb5;
  margin: 0 0 20px;
  font-weight: 500;
  padding-left: 3px;
}

/* ── Booking buttons ───────────────────────────────────────────────────── */
.dv-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.booking-btn {
  width: 250px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition:
    opacity 0.2s,
    background 0.2s;
  border: 2px solid transparent;
}

.booking-btn--primary {
  background: #001a45;
  color: #fff;
  border-color: #001a45;
}

.booking-btn--primary:hover {
  opacity: 0.85;
  color: #fff;
  border-color: #001a45;
}

.booking-btn--secondary {
  background: #fff;
  border-color: #001a45;

  .fusion-button-text {
    color: #001a45;
  }

  i {
    color: #001a45;
  }
}

.booking-btn--secondary:hover {
  background: #f4f6fa;
  border-color: #001a45;
}

.booking-btn__icon {
  font-size: 22px;
  line-height: 1;
  margin-top: -8px;
}

/* Mobile override — anchor to bottom of screen instead */
@media (max-width: 800px) {
  #destination-view {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
    padding: 12px 12px 0;
    box-sizing: border-box;
  }

  #destination-view.visible {
    display: block !important;
    position: static !important;
  }
}
