/* Список слотов: поиск в стиле hero — стекло на градиенте шапки */

.slots-search {
  width: 100%;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.slots-search__inner {
  position: relative;
  max-width: min(52rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

/* Одна строка под инпутом: слева подпись, справа тихие полупрозрачные теги */
.slots-search__popular {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  max-width: min(52rem, 100%);
  margin: 0.5rem auto 0;
  padding: 0 2px;
}

.slots-search__popular-label {
  flex: 0 0 auto;
  margin: 0;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}

.slots-search__chips {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.slots-search__chips::-webkit-scrollbar {
  display: none;
}

.slots-search__chip {
  flex: 0 0 auto;
  max-width: 9.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.slots-search__chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 480px) {
  .slots-search__popular {
    gap: 0.5rem 0.6rem;
  }

  .slots-search__popular-label {
    max-width: 38%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Поле: полупрозрачное «стекло» + blur (как в продуктах на тёмном UI) */
.slots-search__field {
  position: relative;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .slots-search__field {
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    background: rgba(255, 255, 255, 0.09);
  }
}

.slots-search__field:focus-within {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.11);
  box-shadow:
    0 6px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .slots-search__field:focus-within {
    background: rgba(255, 255, 255, 0.12);
  }
}

.slots-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1.1rem 0.9rem 2.85rem;
  border: none;
  border-radius: 14px;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' fill='none' stroke='%23ffffffb3' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E")
    0.95rem 50% no-repeat;
  color: rgba(248, 250, 252, 0.96);
  font-size: 1rem;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.slots-search__input::placeholder {
  color: rgba(255, 255, 255, 0.48);
  font-weight: 400;
}

.slots-search__input:focus {
  outline: none;
}

/* Панель position: fixed — координаты задаёт JS (иначе режется section { overflow: hidden }) */
.slots-search__panel {
  position: fixed;
  z-index: 200;
  margin: 0;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.75);
  overflow: hidden;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .slots-search__panel {
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    backdrop-filter: blur(22px) saturate(1.15);
    background: rgba(22, 30, 50, 0.65);
  }
}

.slots-search__panel-scroll {
  max-height: 21rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
}

.slots-search__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  color: rgba(248, 250, 252, 0.95);
  text-decoration: none;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.slots-search__item:last-child {
  border-bottom: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.slots-search__item:hover,
.slots-search__item.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.slots-search__thumb {
  flex: 0 0 3.25rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slots-search__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slots-search__thumb--empty {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.03)
  );
}

.slots-search__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.slots-search__title {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slots-search__meta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.72);
}

.slots-search__empty {
  padding: 1rem 1.1rem;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.9rem;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .slots-search {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
  }

  .slots-search__input {
    font-size: 16px; /* меньше зум iOS при фокусе */
  }
}
