.search {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
}

.search.active {
  display: block;
}

.search__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search__modal {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  margin: 40px auto;
  background: #ffffff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.search__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px 20px 24px;
  border-bottom: 1px solid #e9e9e9;
}

.search__input {
  flex: 1;
  height: 52px;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: #111111;
  background: transparent;
}

.search__input::placeholder {
  color: #8b8b8b;
}

.search__close {
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  color: #111111;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0;
  margin-right: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search__close:hover {
  opacity: 0.65;
}

.search__results {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 8px 0;
}

.search__item {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1px minmax(0, 1fr) 1px 28px;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  text-decoration: none;
  color: #111111;
  transition: background 0.2s ease;
}

.search__item:hover {
  background: #f6f6f6;
}

.search__item-title {
  font-size: 16px;
  font-weight: 600;
  color: #111111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search__item-divider {
  width: 1px;
  height: 20px;
  background: #d8d8d8;
}

.search__item-desc {
  font-size: 14px;
  color: #666666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search__item-arrow {
  font-size: 18px;
  color: #111111;
  text-align: right;
  font-weight: 400;
}

.search__empty {
  padding: 28px 24px 32px;
  font-size: 15px;
  color: #666666;
}

@media (max-width: 900px) {
  .search__modal {
    width: 100%;
    max-height: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .search__results {
    max-height: calc(100vh - 92px);
  }

  .search__item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search__item-divider,
  .search__item-arrow {
    display: none;
  }
}
