/**
 * Compact global search/assistant for interior-page Blocksy headers.
 */

.gmr-global-assistant {
  --gmr-assistant-blue: #184570;
  --gmr-assistant-pink: #e91e8c;
  --gmr-assistant-ink: #10223a;
  --gmr-assistant-muted: #65758a;
  --gmr-assistant-border: #e2e8f0;
  --gmr-assistant-soft: #f6f8fb;
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 100;
  color: var(--gmr-assistant-ink);
  font-family: inherit;
}

#header [data-device="desktop"] [data-row="middle"],
#header [data-device="desktop"] [data-row="middle"] > .ct-container,
#header .gmr-global-assistant-row,
#header .gmr-global-assistant-row > .ct-container {
  overflow: visible;
}

#header [data-device="desktop"] [data-row="middle"] > .ct-container {
  grid-template-columns: auto minmax(260px, 1fr) max-content;
  column-gap: 20px;
}

#header [data-device="desktop"] [data-row="middle"] {
  --height: 96px;
}

#header [data-device="desktop"] [data-row="middle"] > .ct-container > :first-child {
  grid-column: 1;
  grid-row: 1;
}

#header [data-device="desktop"] [data-row="middle"] > .ct-container > :nth-child(2) {
  grid-column: 3;
  grid-row: 1;
}

#header [data-device="desktop"] [data-row="middle"] > .ct-container > .gmr-global-assistant--desktop {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

.gmr-global-assistant__body {
  position: relative;
  width: 100%;
}

.gmr-global-assistant__form,
.gmr-global-assistant__mobile-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(16, 34, 58, 0.1);
}

.gmr-global-assistant__form {
  position: relative;
  gap: 9px;
  padding: 4px 5px 4px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.gmr-global-assistant__form:focus-within {
  border-color: var(--gmr-assistant-pink);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.13), 0 4px 20px rgba(16, 34, 58, 0.1);
}

.gmr-global-assistant__search-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--gmr-assistant-blue);
}

.gmr-global-assistant__search-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.gmr-global-assistant__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gmr-assistant-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
}

.gmr-global-assistant__input::placeholder {
  color: #8a98a8;
  opacity: 1;
}

.gmr-global-assistant__input::-webkit-search-cancel-button {
  cursor: pointer;
}

#header [data-device="desktop"] .gmr-global-assistant__form .gmr-global-assistant__input[type="search"] {
  --theme-form-field-border-width: 0;
  --theme-form-field-height: 34px;
  --theme-form-field-padding: 0;
  min-height: 0;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gmr-global-assistant__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 52px;
  height: 34px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: var(--gmr-assistant-blue);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

#header [data-device="desktop"] .gmr-global-assistant__form .gmr-global-assistant__submit {
  min-height: 34px;
  height: 34px;
}

.gmr-global-assistant__submit:hover {
  background: #123958;
}

.gmr-global-assistant__submit:focus-visible,
.gmr-global-assistant__mobile-toggle:focus-visible {
  outline: 3px solid rgba(233, 30, 140, 0.32);
  outline-offset: 2px;
}

.gmr-global-assistant [hidden] {
  display: none !important;
}

.gmr-global-assistant__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 1000;
  max-height: min(62vh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--gmr-assistant-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 34, 58, 0.18);
  overscroll-behavior: contain;
}

.gmr-global-assistant__listbox {
  padding: 6px 0;
}

.gmr-global-assistant__group + .gmr-global-assistant__group {
  border-top: 1px solid #eef2f6;
}

.gmr-global-assistant__group-title {
  margin: 0;
  padding: 10px 14px 5px;
  color: var(--gmr-assistant-muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gmr-global-assistant__option,
.gmr-global-assistant__ask {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--gmr-assistant-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.gmr-global-assistant__option {
  justify-content: space-between;
  gap: 14px;
  padding: 8px 14px;
}

.gmr-global-assistant__option:hover,
.gmr-global-assistant__option.is-active,
.gmr-global-assistant__option:focus-visible,
.gmr-global-assistant__ask:hover,
.gmr-global-assistant__ask.is-active,
.gmr-global-assistant__ask:focus-visible {
  outline: 0;
  background: var(--gmr-assistant-soft);
  color: var(--gmr-assistant-blue);
}

.gmr-global-assistant__option-label {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmr-global-assistant__option-meta {
  flex: 0 1 auto;
  max-width: 42%;
  overflow: hidden;
  color: var(--gmr-assistant-muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmr-global-assistant__ask {
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px solid rgba(233, 30, 140, 0.2);
  background: #fff8fc;
  color: var(--gmr-assistant-blue);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.gmr-global-assistant__ask::before {
  flex: 0 0 auto;
  color: var(--gmr-assistant-pink);
  content: "✦";
}

.gmr-global-assistant__ask-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmr-global-assistant.is-loading .gmr-global-assistant__form::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gmr-assistant-pink), transparent);
  content: "";
  animation: gmr-assistant-loading 900ms ease-in-out infinite;
}

.gmr-global-assistant__mobile-toggle {
  justify-content: flex-start;
  gap: 10px;
  padding: 0 14px;
  color: var(--gmr-assistant-muted);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.gmr-global-assistant__spark {
  margin-left: auto;
  color: var(--gmr-assistant-pink);
}

@keyframes gmr-assistant-loading {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleX(0.35);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  #header [data-device="desktop"] [data-row="middle"] > .ct-container {
    column-gap: 14px;
  }
}

@media (min-width: 1000px) and (max-width: 1199px) {
  #header [data-device="desktop"] [data-row="middle"] > .ct-container {
    grid-template-columns: auto minmax(0, 1fr) max-content;
    column-gap: 12px;
  }

  .gmr-global-assistant__form {
    gap: 7px;
    padding-left: 10px;
  }
}

@media (min-width: 1000px) {
  .gmr-global-assistant--desktop .gmr-global-assistant__mobile-toggle {
    display: none;
  }
}

@media (max-width: 999px) {
  .gmr-global-assistant-row {
    border-top: 1px solid rgba(16, 34, 58, 0.08);
    background: #fff;
  }

  .gmr-global-assistant-row > .ct-container {
    display: block !important;
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .gmr-global-assistant--mobile .gmr-global-assistant__body {
    display: none;
  }

  .gmr-global-assistant--mobile.is-mobile-open .gmr-global-assistant__mobile-toggle {
    display: none;
  }

  .gmr-global-assistant--mobile.is-mobile-open .gmr-global-assistant__body {
    display: block;
  }

  .gmr-global-assistant__form,
  .gmr-global-assistant__mobile-toggle {
    height: 46px;
  }

  .gmr-global-assistant__panel {
    max-height: calc(100vh - 170px);
  }

  .gmr-global-assistant__option,
  .gmr-global-assistant__ask {
    min-height: 48px;
  }

  .gmr-global-assistant__option {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .gmr-global-assistant__option-meta {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gmr-global-assistant__form,
  .gmr-global-assistant__submit {
    transition: none;
  }

  .gmr-global-assistant.is-loading .gmr-global-assistant__form::after {
    animation: none;
  }
}
