﻿/* =========================
   SEARCH
========================= */

.ps-search {
  --ps-search-rim: rgba(74, 158, 226, 0.96);
  --ps-search-rim-focus: rgba(113, 199, 255, 0.98);
  --ps-search-glow-soft: rgba(48, 132, 210, 0.2);
  --ps-search-glow-focus: rgba(72, 160, 232, 0.3);
  --ps-search-radius: clamp(26px, 2.7vw, 30px);
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 640px;
  margin-top: 0;
  --ps-results-base-top: 88px;
  --ps-results-context-offset: 0px;
}

.ps-search::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128%;
  height: 186px;
  background:
    radial-gradient(ellipse at center, rgba(58, 145, 220, 0.22) 0%, rgba(22, 67, 130, 0.14) 38%, transparent 72%);
  transform: translate(-50%, -50%);
  filter: blur(34px);
  pointer-events: none;
  z-index: -1;
}

.ps-search::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 40px;
  width: min(760px, 118%);
  height: 128px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(74, 158, 226, 0.18) 0%, rgba(16, 48, 96, 0.12) 46%, transparent 74%);
  transform: translate(-50%, -50%);
  filter: blur(24px);
  opacity: 0.78;
  pointer-events: none;
  z-index: 0;
}

.ps-search-top {
  width: 100%;
  max-width: 640px;
  margin: 0 0 28px;
}

.ps-input-wrap {
  position: relative;
  z-index: 24;
  isolation: isolate;
  border-radius: var(--ps-search-radius);
  padding: 0;
  overflow: visible;
  background: transparent;
  box-shadow:
    0 18px 42px rgba(4, 8, 18, 0.42),
    0 0 34px rgba(48, 132, 210, 0.18),
    0 0 72px rgba(38, 103, 184, 0.12),
    var(--ps-shadow);
  animation: ps-search-field-breathe 10s ease-in-out infinite;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ps-input-wrap::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(64, 156, 228, 0.24) 0%, rgba(38, 96, 170, 0.17) 34%, rgba(21, 58, 108, 0.08) 56%, transparent 78%);
  filter: blur(15px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.52;
  animation: ps-search-frame-glow 10s ease-in-out infinite;
  transition: opacity 0.25s ease;
}

.ps-input-wrap:hover {
  transform: translateY(-1px);
  animation: none;
  box-shadow:
    0 20px 44px rgba(4, 8, 18, 0.42),
    0 0 42px rgba(66, 150, 224, 0.18),
    0 0 82px rgba(38, 103, 184, 0.14),
    var(--ps-shadow);
}

.ps-input-wrap:focus-within {
  transform: translateY(-1px);
  animation: none;
  box-shadow:
    0 20px 46px rgba(4, 8, 18, 0.44),
    0 0 46px rgba(72, 160, 232, 0.22),
    0 0 92px rgba(38, 103, 184, 0.16),
    var(--ps-shadow);
}

.ps-input-wrap:hover::after,
.ps-input-wrap:focus-within::after {
  animation: none;
}

.ps-input-wrap:focus-within::after {
  opacity: 0.62;
}

@keyframes ps-search-field-breathe {
  0%,
  100% {
    box-shadow:
      0 18px 42px rgba(4, 8, 18, 0.42),
      0 0 32px rgba(56, 136, 207, 0.14),
      0 0 66px rgba(38, 103, 184, 0.1),
      var(--ps-shadow);
  }

  50% {
    box-shadow:
      0 18px 42px rgba(4, 8, 18, 0.42),
      0 0 42px rgba(56, 136, 207, 0.2),
      0 0 78px rgba(38, 103, 184, 0.14),
      var(--ps-shadow);
  }
}

@keyframes ps-search-frame-glow {
  0%,
  100% {
    opacity: 0.86;
    transform: translateX(0) scaleX(0.985);
  }

  50% {
    opacity: 1;
    transform: translateX(1.5%) scaleX(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-app::before {
    animation: none;
  }

  .ps-input-wrap,
  .ps-input-wrap::after {
    animation: none;
  }
}

.ps-input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: var(--ps-input-height-lg);
  border: 2px solid var(--ps-search-rim);
  border-radius: var(--ps-search-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(249, 251, 255, 0.99) 38%, rgba(233, 239, 249, 0.99) 100%);
  padding: 0 30px 0 56px !important;
  font-size: clamp(var(--ps-type-input), 1.5vw, 19px);
  color: #111827;
  outline: none;
  caret-color: #2f7fc5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(31, 92, 170, 0.12),
    inset 0 -14px 24px rgba(19, 42, 79, 0.055),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.ps-input:hover {
  border-color: rgba(92, 176, 238, 0.98);
}

.ps-input:focus {
  border-color: var(--ps-search-rim-focus);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(31, 92, 170, 0.11),
    inset 0 -14px 24px rgba(19, 42, 79, 0.045),
    inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.ps-input::placeholder {
  color: transparent;
  opacity: 0;
}

.ps-input-ghost {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.3em;
  padding: 0 30px 0 56px;
  color: #6a7890;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.ps-input-ghost-prefix {
  opacity: 0.96;
}

.ps-input-ghost-text {
  color: inherit;
  font-weight: 500;
}

.ps-input:focus + .ps-input-ghost {
  opacity: 0.76;
  transform: translateX(12px);
}

.ps-input:not(:placeholder-shown) + .ps-input-ghost {
  opacity: 0;
  transform: translateX(10px);
}

.ps-input-hint-store {
  display: none !important;
}

.ps-icon {
  display: none;
}
