/*
 * EcoSapa Tour Pages v0.26.0
 * Compact hero search only.
 * IMPORTANT: deliberately scoped to .es-tour-hero so no archive cards,
 * filters, typography, single-trip pages, header or footer are changed.
 */

@media (min-width: 768px) {
  .es-tour-hero .es-hero-search {
    width: min(930px, calc(100vw - 56px)) !important;
    max-width: 930px !important;
    min-height: 60px !important;
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(200px, 1.08fr) 178px !important;
    gap: 0 !important;
    padding: 4px !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 35, 31, .18) !important;
    overflow: hidden !important;
  }

  .es-tour-hero .es-search-field {
    min-height: 52px !important;
    height: 52px !important;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    padding: 0 15px !important;
    border-right: 1px solid #eceae7 !important;
    border-bottom: 0 !important;
    text-align: left !important;
  }

  /* The reference layout is a clean one-line search bar. Keep the real
     form labels in the DOM for semantics, but visually collapse them. */
  .es-tour-hero .es-search-field > label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .es-tour-hero .es-search-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: static !important;
    width: 22px !important;
    height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    color: #ed1c24 !important;
    font-size: 15px !important;
    line-height: 1 !important;
  }

  .es-tour-hero .es-search-field select,
  .es-tour-hero .es-search-field input[type="date"],
  .es-tour-hero .es-search-field input[type="month"] {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 3px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    color: #142521 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
  }

  .es-tour-hero .es-search-submit {
    align-self: center !important;
    justify-self: stretch !important;
    min-height: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #ed1c24 !important;
    color: #fff !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 15.5px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
  }

  .es-tour-hero .es-search-submit:hover,
  .es-tour-hero .es-search-submit:focus {
    background: #d9141c !important;
    color: #fff !important;
  }
}

/* Tablet keeps the same compact visual language but wraps cleanly rather
   than squeezing the fields. */
@media (min-width: 768px) and (max-width: 980px) {
  .es-tour-hero .es-hero-search {
    width: min(760px, calc(100vw - 40px)) !important;
    grid-template-columns: 1fr 1fr !important;
    padding: 5px !important;
    border-radius: 16px !important;
  }

  .es-tour-hero .es-search-field {
    min-height: 50px !important;
    height: 50px !important;
  }

  .es-tour-hero .es-search-field:nth-child(2) {
    border-right: 0 !important;
  }

  .es-tour-hero .es-search-field--date {
    border-top: 1px solid #eceae7 !important;
  }

  .es-tour-hero .es-search-submit {
    min-height: 46px !important;
    height: 46px !important;
  }
}

/* Do not force the desktop one-line treatment on phones. Preserve the
   proven mobile stack, only trim its visual bulk slightly. */
@media (max-width: 767px) {
  .es-tour-hero .es-hero-search {
    padding: 5px !important;
    border-radius: 14px !important;
  }

  .es-tour-hero .es-search-field {
    min-height: 54px !important;
    padding: 7px 13px !important;
  }

  .es-tour-hero .es-search-field > label {
    font-size: 11px !important;
  }

  .es-tour-hero .es-search-field select,
  .es-tour-hero .es-search-field input[type="date"],
  .es-tour-hero .es-search-field input[type="month"] {
    min-height: 30px !important;
    height: 30px !important;
    font-size: 15.5px !important;
  }

  .es-tour-hero .es-search-submit {
    min-height: 48px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }
}
