.global-service-search {
  position: relative;
  flex: 0 1 320px;
  width: 320px;
  min-width: 190px;
  max-width: 360px;
  margin-left: auto;
  z-index: 1001;
}

.global-search-field {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d8dee7;
  border-radius: 13px;
  background: #fff;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.global-search-field:hover:not(:focus-within) {
  border-color: #b7c2d0;
}

.global-service-search.is-open .global-search-field,
.global-search-field:focus-within {
  border-color: #294363;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(41, 67, 99, 0.14);
}

.global-search-icon {
  color: #718096;
  font-size: 16px;
  transition: color 0.25s ease;
}

.global-search-field:focus-within .global-search-icon {
  color: #294363;
}

.global-search-field input {
  min-width: 0;
  flex: 1;
  height: 100%;
  color: #142333;
  background: transparent;
  font-size: 13px;
}

.global-search-field input::placeholder {
  color: #8994a2;
}

.global-search-field input:focus,
.global-search-field input:focus-visible {
  outline: none;
  box-shadow: none;
}

.global-search-field input::-webkit-search-cancel-button {
  display: none;
}

.global-search-clear,
.global-search-mobile-trigger {
  display: none;
}

.global-search-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  max-height: 480px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(7, 18, 36, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 52px rgba(7, 18, 36, 0.16);
  scrollbar-width: thin;
  z-index: 1100;
}

.global-search-panel[hidden] {
  display: none;
}

.global-search-panel-inner {
  padding: 8px;
}

.global-search-heading {
  margin: 4px 6px 12px;
  color: #7a8794;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.global-search-popular {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.global-search-chip {
  padding: 9px 12px;
  border: 1px solid rgba(7, 18, 36, 0.1);
  border-radius: 999px;
  color: #1a2b39;
  background: #f7f9fc;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.global-search-chip:hover,
.global-search-chip:focus-visible {
  border-color: #9aaabd;
  color: #142333;
  background: #f0f4f8;
}

.global-search-results {
  display: grid;
  gap: 4px;
}

.global-search-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  padding: 11px 10px;
  border-radius: 12px;
  color: #1a2b39;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.global-search-result:hover,
.global-search-result:focus-visible,
.global-search-result.is-active {
  background: #f0f4f8;
}

.global-search-result:focus-visible {
  outline: 2px solid #294363;
  outline-offset: -2px;
}

.global-search-result-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #718096;
  background: #f0f3f6;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.global-search-result:hover .global-search-result-icon,
.global-search-result:focus-visible .global-search-result-icon,
.global-search-result.is-active .global-search-result-icon {
  color: #294363;
  background: #e4ebf2;
}

.global-search-result-content {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.global-search-result-name {
  overflow: hidden;
  color: #142333;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result-category,
.global-search-result-description {
  overflow: hidden;
  color: #7a8794;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result-description {
  color: #9aa4ae;
}

.global-search-result-arrow {
  color: #b7c0c8;
  font-size: 18px;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.global-search-result:hover .global-search-result-arrow,
.global-search-result:focus-visible .global-search-result-arrow,
.global-search-result.is-active .global-search-result-arrow {
  color: #294363;
  transform: translateX(3px);
}

.global-search-more {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border-top: 1px solid #edf0f3;
  color: #ff6b00;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.global-search-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 12px 16px;
  color: #5d6d7d;
  text-align: center;
}

.global-search-empty-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ff6b00;
  background: #fff2e8;
}

.global-search-empty strong {
  color: #1a2b39;
  font-size: 13px;
}

.global-search-empty p {
  margin: 0;
  font-size: 11px;
}

.global-search-hint {
  max-width: 300px;
  line-height: 1.6;
}

.global-search-contact {
  margin-top: 5px;
  color: #294363;
  font-size: 11px;
  font-weight: 700;
}

.global-service-search button:focus-visible,
.global-search-chip:focus-visible,
.global-search-more:focus-visible,
.global-search-contact:focus-visible {
  outline: 2px solid #294363;
  outline-offset: 3px;
}

.global-search-clear:hover,
.global-search-mobile-trigger:hover {
  color: #294363;
}

@media (max-width: 760px) {
  .global-service-search {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin-left: 0;
  }

  .global-search-field {
    display: none;
  }

  .global-search-mobile-trigger {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 16px;
    transition:
      color 0.2s ease,
      border-color 0.2s ease,
      background 0.2s ease;
  }

  .global-search-panel {
    position: fixed;
    inset: 0;
    max-height: none;
    padding: 92px 18px 24px;
    border: 0;
    border-radius: 0;
    background: #f7f9fc;
    box-shadow: none;
    z-index: 2000;
  }

  .global-search-panel::before {
    content: "Search COMPLYO services";
    position: absolute;
    top: 30px;
    left: 20px;
    color: #142333;
    font-size: 18px;
    font-weight: 700;
  }

  .global-search-panel-inner {
    max-width: 620px;
    margin: 0 auto;
    padding: 0;
  }

  .global-service-search.is-mobile-overlay .global-search-field {
    position: fixed;
    top: 66px;
    left: 18px;
    right: 58px;
    z-index: 2002;
    display: flex;
    border-color: #d8dee7;
    background: #fff;
    box-shadow: 0 8px 24px rgba(7, 18, 36, 0.12);
  }

  .global-service-search.is-mobile-overlay
    .global-search-field:focus-within {
    border-color: #294363;
    box-shadow: 0 0 0 3px rgba(41, 67, 99, 0.14);
  }

  .global-service-search.is-mobile-overlay .global-search-field input {
    color: #142333;
  }

  .global-service-search.is-mobile-overlay
    .global-search-field
    input::placeholder,
  .global-service-search.is-mobile-overlay .global-search-icon {
    color: #7a8794;
  }

  .global-service-search.is-mobile-overlay .global-search-clear {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    color: #7a8794;
    background: transparent;
    font-size: 21px;
  }

  .global-service-search.is-mobile-overlay .global-search-mobile-trigger {
    position: fixed;
    top: 66px;
    right: 18px;
    z-index: 2003;
    border-color: transparent;
    color: #142333;
    background: transparent;
    font-size: 0;
  }

  .global-service-search.is-mobile-overlay
    .global-search-mobile-trigger:hover {
    color: #294363;
  }

  .global-service-search.is-mobile-overlay
    .global-search-mobile-trigger::after {
    content: "×";
    font-size: 28px;
    font-weight: 300;
  }

  .global-search-lock {
    overflow: hidden;
  }
}

@media (max-width: 560px) {
  .global-search-panel {
    padding-right: 14px;
    padding-left: 14px;
  }

  .global-service-search.is-mobile-overlay .global-search-field {
    left: 14px;
    right: 54px;
  }

  .global-service-search.is-mobile-overlay .global-search-mobile-trigger {
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-search-field,
  .global-search-icon,
  .global-search-chip,
  .global-search-result,
  .global-search-result-icon,
  .global-search-result-arrow,
  .global-search-mobile-trigger {
    transition-duration: 0.01ms;
  }
}
