/* ============================================================
   HITIKET — UI ENHANCEMENTS

   - Responsive hero background
   - Landing / search-result hero states
   - Location autocomplete
   - Clear / X button
============================================================ */


/* ============================================================
   1. HERO — LANDING STATE
============================================================ */

.search-hero {
  background-color: #ffffff;

  background-image:
    url("assets/beach-desktop.webp");

  background-repeat: no-repeat;

  background-position:
    center top;

  background-size:
    100% auto;
}


/*
   Desktop landing:
   hero dibuat lebih compact dari desain awal.
*/

@media (min-width: 900px) {

  .search-hero {
    min-height: calc(100vw * 700 / 1920);

    padding-top: 42px;

    box-sizing: border-box;
  }

  .hero-heading {
    margin-bottom: 30px;
  }
}


/* ============================================================
   2. HERO HEADLINE — LANDING STATE
============================================================ */

.hero-heading h1,
.hero-heading h1 span {
  color: #ffffff;

  font-weight: 700;

  text-shadow: none;
}


/*
   Subtitle hero sengaja dihilangkan.
*/

.hero-subtitle {
  display: none;
}


/* ============================================================
   3. HERO — TABLET & MOBILE
============================================================ */

@media (max-width: 900px) {

  .search-hero {
    background-color: #ffffff;

    background-image:
      url("assets/beach-mobile.webp");

    background-repeat: no-repeat;

    background-position:
      center top;

    background-size:
      100% auto;
  }

  .hero-heading {
    margin-bottom: 28px;
  }
}


/* ============================================================
   4. LOCATION FIELD
============================================================ */

.location-field {
  position: relative;
  overflow: visible;
}

.location-native-select[hidden] {
  display: none !important;
}


/* ============================================================
   5. TEXT INPUT
============================================================ */

.search-field .location-input {
  width: 100%;
  min-width: 0;
  height: 25px;

  padding: 0 44px 0 0;

  border: 0;
  border-radius: 0;

  background: transparent;
  color: var(--ocean);

  font-size: 12px;
  font-weight: 700;
  line-height: 25px;

  cursor: text;

  outline: 0;
  box-shadow: none;

  text-overflow: ellipsis;
}

.search-field .location-input::placeholder {
  color: var(--muted-light);
  font-weight: 500;
}

.search-field .location-input:focus {
  outline: 0;
  box-shadow: none;
}

.search-field .location-input[aria-invalid="true"] {
  color: var(--danger-text);
}


/* ============================================================
   6. CHEVRON
============================================================ */

.location-field::after {
  content: "";

  position: absolute;

  right: 15px;
  bottom: 24px;

  width: 7px;
  height: 7px;

  border-right: 1.6px solid var(--ocean);
  border-bottom: 1.6px solid var(--ocean);

  transform: rotate(45deg);

  pointer-events: none;

  opacity: 0.9;

  transition:
    opacity 0.12s ease;
}

.location-field:focus-within::after {
  opacity: 0;
}

.airport-fields
.search-field:first-child.location-field::after {
  right: 26px;
}

.airport-fields
.search-field:last-child.location-field::after {
  right: 15px;
}


/* ============================================================
   7. CLEAR / X BUTTON
============================================================ */

.location-clear {
  position: absolute;

  z-index: 7;

  right: 15px;
  bottom: 17px;

  display: flex;

  align-items: center;
  justify-content: center;

  width: 21px;
  height: 21px;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background: #68777c;
  color: #ffffff;

  font-family:
    Arial,
    sans-serif;

  font-size: 17px;
  font-weight: 400;
  line-height: 1;

  cursor: pointer;

  opacity: 0;

  pointer-events: none;

  transform: scale(0.92);

  transition:
    opacity 0.12s ease,
    transform 0.12s ease,
    background 0.12s ease;
}

.location-field:focus-within
.location-clear:not([hidden]) {
  opacity: 1;

  pointer-events: auto;

  transform: scale(1);
}

.location-clear:hover {
  background: var(--ocean);
}

.location-clear:active {
  transform: scale(0.93);
}

.location-clear:focus-visible {
  outline: 3px solid rgba(13, 183, 183, 0.3);
  outline-offset: 2px;
}

.airport-fields
.search-field:first-child
.location-clear {
  right: 26px;
}

.airport-fields
.search-field:last-child
.location-clear {
  right: 15px;
}


/* ============================================================
   8. SUGGESTION PANEL
============================================================ */

.location-suggestions {
  position: absolute;

  z-index: 80;

  top: calc(100% + 8px);
  left: 0;

  width: min(
    380px,
    calc(100vw - 40px)
  );

  max-height: 330px;

  overflow-y: auto;

  padding: 7px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: #ffffff;

  box-shadow: var(--shadow-lg);

  overscroll-behavior: contain;
}

.airport-fields
.search-field:last-child
.location-suggestions {
  right: 0;
  left: auto;
}


/* ============================================================
   9. SUGGESTION OPTION
============================================================ */

.location-option {
  display: grid;

  grid-template-columns:
    30px
    minmax(0, 1fr)
    auto;

  align-items: center;

  gap: 10px;

  width: 100%;
  min-height: 58px;

  padding: 9px 10px;

  border: 0;
  border-radius: 10px;

  background: transparent;

  color: var(--ocean);

  text-align: left;

  transition:
    background 0.14s ease,
    color 0.14s ease;
}

.location-option:hover,
.location-option.active {
  background: var(--brand-soft);
}


/* ============================================================
   10. LOCATION ICON
============================================================ */

.location-option-icon {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  border-radius: 999px;

  background: var(--ice);
  color: var(--brand);

  font-size: 12px;
  font-weight: 800;
}


/* ============================================================
   11. LOCATION TEXT
============================================================ */

.location-option-copy {
  min-width: 0;
}

.location-option-copy strong,
.location-option-copy small {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-option-copy strong {
  color: var(--ocean);

  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.location-option-copy small {
  margin-top: 3px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 500;
  line-height: 1.45;
}


/* ============================================================
   12. CITY / AIRPORT TAG
============================================================ */

.location-option-type {
  align-self: center;

  padding: 4px 7px;

  border-radius: 999px;

  background: var(--surface);

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;
  line-height: 1;

  white-space: nowrap;
}


/* ============================================================
   13. LOADING / EMPTY MESSAGE
============================================================ */

.location-message {
  padding: 14px 13px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 500;
  line-height: 1.55;
}


/* ============================================================
   14. AUTOCOMPLETE — MOBILE
============================================================ */

@media (max-width: 680px) {

  .location-suggestions,
  .airport-fields
  .search-field:last-child
  .location-suggestions {

    right: auto;
    left: 0;

    width: min(
      340px,
      calc(100vw - 48px)
    );
  }

  .search-field .location-input {
    padding-right: 40px;

    font-size: 11.5px;
  }

  .location-option {
    min-height: 56px;
  }

  .location-clear {
    width: 20px;
    height: 20px;

    bottom: 17px;

    font-size: 16px;
  }
}


/* ============================================================
   15. HERO — SEARCH RESULTS STATE
============================================================ */

/*
   Ketika hasil pencarian sudah muncul:
   - foto pantai dilepas
   - background kembali putih
   - tampilan berubah dari "landing" menjadi "search tool"
*/

.has-results .search-hero {
  background-color: #ffffff;

  background-image: none;
}


/*
   Headline kembali menggunakan warna brand HiTiket.
*/

.has-results .hero-heading h1 {
  color: var(--ocean);

  text-shadow: none;
}

.has-results .hero-heading h1 span {
  color: var(--brand);

  text-shadow: none;
}


/*
   Pastikan kondisi tablet/mobile juga tidak
   mengaktifkan kembali beach-mobile.webp
   ketika hasil pencarian sudah muncul.
*/

@media (max-width: 900px) {

  .has-results .search-hero {
    background-color: #ffffff;

    background-image: none;
  }
}

/* ============================================================
   16. SEBELUM BERANGKAT / FAQ
============================================================ */

.travel-notes-section {
  padding: 76px 0 82px;

  background: #ffffff;
}

.travel-notes-grid {
  display: grid;

  grid-template-columns:
    minmax(220px, 0.72fr)
    minmax(0, 1.55fr);

  gap: 86px;

  align-items: start;
}


/* ============================================================
   HEADING
============================================================ */

.travel-notes-heading {
  padding-top: 5px;
}

.travel-notes-eyebrow {
  margin: 0 0 17px;

  color: var(--brand);

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 2.2px;
  line-height: 1.5;

  text-transform: uppercase;
}

.travel-notes-heading h2 {
  margin: 0;

  color: var(--ocean);

  font-size: clamp(29px, 2.4vw, 38px);
  font-weight: 700;

  letter-spacing: -1.5px;
  line-height: 1.08;
}


/* ============================================================
   ACCORDION LIST
============================================================ */

.travel-notes-list {
  border-top: 1px solid var(--border);
}

.travel-note {
  border-bottom: 1px solid var(--border);
}

.travel-note summary {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    32px;

  align-items: center;

  gap: 20px;

  min-height: 70px;

  padding: 21px 0;

  color: var(--ocean);

  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;

  cursor: pointer;

  list-style: none;
}

.travel-note summary::-webkit-details-marker {
  display: none;
}

.travel-note summary::marker {
  display: none;
  content: "";
}


/* ============================================================
   PLUS ICON
============================================================ */

.travel-note-plus {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;

  justify-self: end;

  color: var(--ocean);

  font-size: 21px;
  font-weight: 400;
  line-height: 1;

  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.travel-note summary:hover .travel-note-plus {
  color: var(--brand);
}

.travel-note[open] .travel-note-plus {
  transform: rotate(45deg);

  color: var(--brand);
}


/* ============================================================
   ANSWER
============================================================ */

.travel-note-answer {
  max-width: 680px;

  padding: 0 52px 22px 0;
}

.travel-note-answer p {
  margin: 0;

  color: var(--muted);

  font-size: 11px;
  font-weight: 400;

  line-height: 1.8;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 900px) {

  .travel-notes-section {
    padding: 62px 0 68px;
  }

  .travel-notes-grid {
    grid-template-columns: 1fr;

    gap: 38px;
  }

  .travel-notes-heading h2 br {
    display: none;
  }
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 680px) {

  .travel-notes-section {
    padding: 48px 0 54px;
  }

  .travel-notes-grid {
    gap: 28px;
  }

  .travel-notes-eyebrow {
    margin-bottom: 12px;

    font-size: 8px;
  }

  .travel-notes-heading h2 {
    font-size: 28px;
  }

  .travel-note summary {
    min-height: 64px;

    padding: 18px 0;

    font-size: 11px;

    gap: 13px;
  }

  .travel-note-plus {
    width: 27px;
    height: 27px;

    font-size: 19px;
  }

  .travel-note-answer {
    padding:
      0
      34px
      20px
      0;
  }

  .travel-note-answer p {
    font-size: 10.5px;
  }
}

/* ============================================================
   RESULT PAGE — COMPACT HERO DESKTOP
   Landing hero 1920:786 tetap tidak berubah
============================================================ */

@media (min-width: 901px) {

  .has-results .search-hero {
    min-height: 0 !important;
    height: auto;

    padding-top: 30px;
    padding-bottom: 24px;
  }

}
/* ============================================================
   SEARCH RESULTS — FOCUS MODE
   Pantai + headline hanya tampil pada landing awal
============================================================ */

.has-results .hero-heading {
  display: none;
}

.has-results .search-hero {
  min-height: 0 !important;

  padding-top: 18px;
  padding-bottom: 20px;

  background-color: #ffffff;
  background-image: none;
}


/* Mobile dibuat sedikit lebih rapat */

@media (max-width: 680px) {

  .has-results .search-hero {
    padding-top: 14px;
    padding-bottom: 18px;
  }

}

/* ============================================================
   SEARCH RESULTS — HEADER CLEARANCE TABLET / MOBILE
   Hanya berlaku setelah hasil pencarian muncul
============================================================ */

@media (max-width: 900px) {

  .has-results .search-hero {
    padding-top: 60px;
  }

}


@media (max-width: 680px) {

  .has-results .search-hero {
    padding-top: 56px;
  }

}