/*
 * Shared boat-search component entry point.
 * Keep the legacy source split while pages migrate; consumers only load this file.
 */
@import url('/css/routes-search.css');
@import url('/css/routes-date.css');

/*
 * Keep map popup actions here as well as in routes-date.css. Imported CSS can
 * remain cached independently from this versioned module entry point.
 */
.route-harbor-dialog .leaflet-popup-content button.route-harbor-select {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin: 6px 0 0;
  padding: 10px 34px 10px 14px;
  border: 1px solid #078bc2 !important;
  border-radius: 11px !important;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(135deg, #13aade 0%, #078bc7 100%) !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 7px 18px rgba(7, 139, 199, .24) !important;
  transition: box-shadow .16s ease, filter .16s ease, transform .16s ease;
}

.route-harbor-dialog .leaflet-popup-content button.route-harbor-select::after {
  position: absolute;
  right: 13px;
  content: "\2192";
  font-size: 16px;
  font-weight: 400;
}

.route-harbor-dialog .leaflet-popup-content button.route-harbor-select:hover,
.route-harbor-dialog .leaflet-popup-content button.route-harbor-select:focus-visible {
  filter: brightness(.97);
  box-shadow: 0 9px 22px rgba(7, 139, 199, .3) !important;
  transform: translateY(-1px);
}

.route-harbor-dialog .leaflet-popup-content button.route-harbor-select:focus-visible {
  outline: 3px solid rgba(14, 165, 218, .2);
  outline-offset: 2px;
}

.route-harbor-dialog .leaflet-popup-content button.route-harbor-select--secondary {
  border-color: #b9dcec !important;
  background: linear-gradient(135deg, #f7fcff, #eaf8fd) !important;
  color: #176f98 !important;
  box-shadow: none !important;
}

.route-harbor-dialog .leaflet-popup-content button.route-harbor-select:disabled {
  border-color: #dce5ea !important;
  background: #e9eef1 !important;
  color: #8797a1 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none;
}

.route-harbor-dialog .leaflet-popup-content button.route-harbor-select:disabled::after {
  display: none;
}

.route-harbor-dialog .route-harbor-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.route-harbor-dialog button.route-harbor-reset {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid rgba(63, 120, 162, .28) !important;
  border-radius: 12px !important;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, .92) !important;
  color: #287398 !important;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 5px 16px rgba(35, 70, 96, .13) !important;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.route-harbor-dialog button.route-harbor-reset > span {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 17px;
}

.route-harbor-dialog button.route-harbor-reset:hover,
.route-harbor-dialog button.route-harbor-reset:focus-visible {
  border-color: #83c9e5 !important;
  background: #fff !important;
  box-shadow: 0 7px 18px rgba(35, 70, 96, .17) !important;
  transform: translateY(-1px);
}

.route-harbor-dialog .route-harbor-guidance {
  position: absolute;
  z-index: 1001;
  top: 104px;
  left: 50%;
  display: flex;
  max-width: calc(100% - 32px);
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 15px 10px 10px;
  border: 1px solid rgba(13, 148, 190, .24);
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  color: #244a5d;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(22, 68, 91, .2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity .2s ease, transform .2s ease;
}

.route-harbor-dialog .route-harbor-guidance.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.route-harbor-dialog .route-harbor-guidance-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #17b7df, #078bc7);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(7, 139, 199, .2);
}

.route-harbor-dialog button.route-harbor-reset:focus-visible {
  outline: 3px solid rgba(14, 165, 218, .18);
  outline-offset: 2px;
}

@media (max-width: 575px) {
  .route-harbor-dialog .route-harbor-head-actions {
    align-self: center;
  }

  .route-harbor-dialog button.route-harbor-reset {
    position: absolute;
    right: 65px;
    bottom: 13px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px !important;
  }

  .route-harbor-dialog .route-harbor-guidance {
    top: 113px;
    width: calc(100% - 28px);
    max-width: none;
    justify-content: flex-start;
    font-size: 11px;
  }
}

/* Compact alternative method inside the harbor chooser. */
.route-choice-dialog .route-choice-map-action {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #d3e5ed !important;
  border-radius: 11px !important;
  appearance: none;
  -webkit-appearance: none;
  background: #f8fcfe !important;
  color: #294553;
  box-shadow: none !important;
  text-align: left;
}

.route-choice-dialog .route-choice-map-action > .route-choice-map-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: #e2f4fb;
  color: #078fc9;
}

.route-choice-dialog .route-choice-map-action strong {
  color: #176f98;
  font-size: 12px;
  font-weight: 750;
}

.route-choice-dialog .route-choice-map-action small {
  color: #778993;
  font-size: 10px;
}

.route-choice-dialog .route-choice-map-action:hover,
.route-choice-dialog .route-choice-map-action:focus-visible {
  border-color: #87c8df !important;
  background: #f1faff !important;
  box-shadow: 0 5px 14px rgba(42, 118, 151, .1) !important;
  outline: 0;
  transform: translateY(-1px);
}

.route-choice-dialog .route-choice-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 2px 7px;
  color: #8a99a2;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
}

.route-choice-dialog .route-choice-divider::before,
.route-choice-dialog .route-choice-divider::after {
  height: 1px;
  flex: 1 1 auto;
  background: #e5edf1;
  content: "";
}

.route-choice-dialog .route-choice-list-label {
  margin-top: 0;
}

/* Keep the shared form independent from page-level button styles. */
.boat-search .route-search-field .route-picker-button {
  width: 100%;
  height: auto;
  min-height: 25px;
  padding: 2px 28px 2px 0;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #0b1720;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.boat-search .route-from .route-picker-button {
  padding-right: 32px;
}

.boat-search .route-search-field .route-picker-button.is-placeholder {
  color: #526570;
  font-weight: 600;
}

/* Icons are part of the shared module markup, not page-specific glyphs. */
.boat-search .route-search-help > span::before,
.boat-search .route-search-help > a::before {
  display: none;
  content: none;
}

.boat-search .route-help-icon {
  flex: 0 0 auto;
  margin-right: 7px;
  color: #0798d4;
  font-size: 13px;
  line-height: 1;
}

.boat-search .route-help-icon::before {
  width: auto;
  margin: 0;
}

.route-choice-heading-icon i,
.route-choice-map-icon i {
  display: block;
  margin: 0;
  font-size: 16px;
  line-height: 1;
}

.route-choice-heading-icon i::before,
.route-choice-map-icon i::before {
  display: block;
  width: auto;
  margin: 0;
  line-height: 1;
}

.boat-search .route-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 0;
  outline: 0;
  appearance: none;
  background: linear-gradient(135deg, #0ca6df 0%, #078dcc 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.boat-search .route-search-submit:hover,
.boat-search .route-search-submit:focus-visible {
  border: 0;
  outline: 0;
  background: linear-gradient(135deg, #0798d4 0%, #087fb4 100%);
  color: #fff;
  box-shadow: 0 7px 17px rgba(7, 142, 204, 0.22);
}

/* Homepage treatment: lightweight gradient instead of the legacy photo hero. */
#search_container.boat-search-index-section {
  position: relative;
  display: block;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: clamp(92px, 9vw, 118px) 18px clamp(42px, 5vw, 70px);
  color: #243746;
  background:
    radial-gradient(ellipse at 8% 12%, rgba(16, 181, 224, 0.20) 0%, rgba(16, 181, 224, 0) 38%),
    radial-gradient(ellipse at 92% 4%, rgba(121, 100, 226, 0.13) 0%, rgba(121, 100, 226, 0) 36%),
    radial-gradient(ellipse at 68% 94%, rgba(45, 196, 180, 0.10) 0%, rgba(45, 196, 180, 0) 35%),
    linear-gradient(145deg, #edfaff 0%, #f7fbff 48%, #fbf9ff 100%);
  border-bottom: 1px solid #deebf1;
  z-index: 1;
}

#search_container.boat-search-index-section::before,
#search_container.boat-search-index-section::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
  filter: blur(1px);
}

#search_container.boat-search-index-section::before {
  top: 54px;
  left: -110px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(39, 164, 207, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.12), 0 0 0 96px rgba(39, 164, 207, 0.035);
}

#search_container.boat-search-index-section::after {
  top: -135px;
  right: -95px;
  width: 350px;
  height: 350px;
  border-radius: 42% 58% 64% 36%;
  background: linear-gradient(145deg, rgba(139, 117, 224, 0.08), rgba(62, 189, 211, 0.05));
  transform: rotate(18deg);
}

.boat-search-index-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.boat-search-index-intro {
  max-width: 960px;
  margin: 0 auto clamp(26px, 3vw, 34px);
  text-align: center;
}

.boat-search-index-intro h1 {
  margin: 0;
  color: #18394a;
  font-size: clamp(27px, 3.2vw, 42px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.14;
}

.boat-search-index-intro p {
  max-width: 920px;
  margin: 6px auto 0;
  color: #58717e;
  font-size: clamp(14px, 1.45vw, 17px);
  line-height: 1.65;
}

.boat-search--index {
  margin: 0;
}

.boat-search-results-shell {
  width: min(1120px, calc(100% - 36px));
  max-width: none;
  padding-right: 0;
  padding-left: 0;
  margin-right: auto;
  margin-left: auto;
}

.boat-search-results-shell .boat-search--search-results {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

/* Boat detail sidebar: the shared component stays compact at desktop widths. */
.fastboat-search-card .boat-search--fastboat {
  width: 100%;
  margin: 0;
}

.fastboat-search-card {
  margin-bottom: 24px;
}

.boat-search--fastboat .route-search-heading {
  min-height: 64px;
  gap: 11px;
  padding: 12px 15px;
}

.boat-search--fastboat .route-search-plain-heading {
  align-items: center;
  border: 1px solid #dbe7ed;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background:
    radial-gradient(circle at 8% 15%, rgba(20, 172, 220, 0.18), transparent 38%),
    linear-gradient(135deg, #dff5fd 0%, #eaf5fc 52%, #f2f0ff 100%);
}

#fastboat .boat-search--fastboat .route-search-plain-heading > .route-search-heading-icon {
  position: static !important;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  box-sizing: border-box;
  padding: 0 !important;
  place-items: center;
  border-radius: 9px;
  background: #dff4fc;
  color: #0788be;
  font-size: 20px;
}

#fastboat .boat-search--fastboat .route-search-plain-heading > .route-search-heading-icon::before {
  display: none !important;
  content: none;
}

#fastboat .boat-search--fastboat .route-search-heading-icon i {
  display: block;
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1;
}

#fastboat .boat-search--fastboat .route-search-heading-icon i::before {
  margin: 0;
}

.boat-search--fastboat .route-search-plain-heading strong {
  color: #18394a;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.boat-search--fastboat .route-search-plain-heading small {
  margin-top: 2px;
  color: #6f8490;
  font-size: 11px;
  line-height: 1.3;
}

.boat-search--fastboat .route-search-form {
  padding: 14px;
}

.boat-search--fastboat .route-search-plain-heading + .route-search-form {
  border: 1px solid #dbe7ed;
  border-radius: 0 0 13px 13px;
  background:
    radial-gradient(circle at 100% 0%, rgba(117, 108, 224, 0.09), transparent 34%),
    linear-gradient(180deg, #e9f8fd 0%, #f4fbfd 38%, #fff 72%);
  box-shadow: 0 14px 30px rgba(22, 112, 151, 0.13);
}

.boat-search--fastboat .route-search-main {
  grid-template-columns: minmax(0, 1fr);
}

.boat-search--fastboat .route-search-field {
  min-height: 72px;
  padding: 10px 14px;
  border-right: 0;
  border-bottom: 1px solid #d4dee6;
}

#fastboat .boat-search--fastboat .route-from .route-picker-button,
#fastboat .boat-search--fastboat .route-to .route-picker-button {
  width: 100%;
  height: auto;
  min-height: 25px;
  padding-top: 2px;
  padding-bottom: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #0b1720;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

#fastboat .boat-search--fastboat .route-picker-button.is-placeholder {
  color: #526570;
  font-weight: 600;
}

#fastboat .boat-search--fastboat .route-picker-button::after {
  top: 7px;
}

.boat-search--fastboat .route-to {
  padding-right: 52px;
  padding-left: 14px;
}

.boat-search.boat-search--fastboat .route-swap {
	top: 54px;
	right: 7px;
	left: auto;
	transform: rotate(90deg);
}

.boat-search--fastboat .route-travel-date {
  grid-column: auto;
}

.boat-search--fastboat .route-search-submit {
  width: auto;
  max-width: none;
  box-sizing: border-box;
  grid-column: auto;
  min-height: 50px;
  margin: 9px;
  border-radius: 9px;
}

#fastboat .boat-search--fastboat .route-search-submit {
  width: auto;
  min-width: 0;
  justify-self: stretch;
}

.boat-search--fastboat .route-search-help {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  justify-items: center;
  padding: 9px 12px;
  text-align: center;
}

.boat-search--fastboat .route-search-help > span,
.boat-search--fastboat .route-search-help > a {
  min-height: 22px;
  padding: 0;
}

.boat-search--fastboat .route-search-help > :not(:first-child) {
  border-left: 0;
}

@media (min-width: 768px) and (max-width: 1000px) {
  .boat-search .route-travel-date {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  /* Keep this spacing in the versioned entry point, beyond cached imports. */
  .boat-search .route-mobile-alternative {
    padding-top: 14px;
  }

  .boat-search ~ .daterangepicker,
  .daterangepicker {
    top: 64px !important;
    bottom: 10px !important;
    max-height: calc(100vh - 74px);
    max-height: calc(100dvh - 74px);
    overscroll-behavior: contain;
  }

  .boat-search .route-search-field .route-picker-button {
    font-size: 16px;
  }

  .boat-search-results-shell {
    width: calc(100% - 24px);
  }

  #search_container.boat-search-index-section {
    padding: 84px 12px 30px;
    background:
      radial-gradient(ellipse at 0 5%, rgba(16, 181, 224, 0.18), transparent 42%),
      radial-gradient(ellipse at 100% 0, rgba(121, 100, 226, 0.10), transparent 38%),
      linear-gradient(155deg, #effaff 0%, #f8fbff 58%, #fff 100%);
  }

  #search_container.boat-search-index-section::before {
    top: 90px;
    left: -185px;
  }

  #search_container.boat-search-index-section::after {
    top: -210px;
    right: -210px;
  }

  .boat-search-index-intro {
    margin-bottom: 22px;
    padding: 0 8px;
  }

  .boat-search-index-intro h1 {
    font-size: clamp(25px, 8vw, 32px);
  }

  .boat-search-index-intro p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.55;
  }
}
