/* search field */
.search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 1.25rem 1rem;
  width: 100%;
}

/* poda */
#poda {
  position: relative;
  width: min(360px, 100%);
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

#poda > .glow,
#poda > .border,
#poda > .darkBorderBg,
#poda > .white {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

#poda > .white { inset: 2px; border-radius: 12px; filter: blur(2px); }
#poda > .border { inset: 1px; border-radius: 13px; filter: blur(.5px); }
#poda > .darkBorderBg { inset: 0; filter: blur(3px); }
#poda > .glow { inset: -14px; border-radius: 26px; filter: blur(26px); opacity: .45; }

/* main */
#main {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

#pink-mask { display: none; }

/* Accessibility label stays available to screen readers without changing the visual layout. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* input */
.input {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  height: 100%;
  border: none;
  outline: none;
  border-radius: 12px;

  padding-inline-start: 52px;
  padding-inline-end: 18px;
  font-family: var(--font-family, "Vazirmatn", sans-serif);
  font-size: 15px;
  color: #e6e9f5;
  background: #12142a;
  transition: background .25s ease, color .25s ease;
}

.input::placeholder { color: #7d84a3; }

.input:focus {
  background: #171a34;
  color: #fff;
}

/* light theme */
body.light-theme .input {
  background: #ffffff;
  color: #16182b;
}

body.light-theme .input::placeholder { color: #9099b5; }
body.light-theme .input:focus { background: #ffffff; color: #16182b; }


/* search icon */
#search-icon {
  position: absolute;
  inset-inline-start: 16px;
  inset-inline-end: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--color-accent, #00d4ff);
}

#search-icon svg { width: 20px; height: 20px; display: block; }

/* search results */
.search-results {
  position: relative;
  left: auto;
  transform: none;
  width: min(360px, 100%);
  max-width: none;
  margin: 12px auto 0;
  border-radius: 14px;
  background: rgba(20, 22, 42, .97);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}

.search-results.active { display: block; animation: none; }

body.light-theme .search-results {
  background: #ffffff;
  border-color: rgba(18, 22, 48, .12);
  box-shadow: 0 16px 36px rgba(30, 40, 90, .14);
}

/* mobile 520px */
@media (max-width: 520px) {
  #poda { height: 48px; }
  .input {
    font-size: 15px;
    padding-inline-start: 46px;
    padding-inline-end: 14px;
  }
  #search-icon { inset-inline-start: 14px; }
  #search-icon svg { width: 18px; height: 18px; }
}

html[data-perf-tier="very-low"] #poda > .glow,
html[data-perf-tier="low"] #poda > .glow { display: none; }

html[data-perf-tier="very-low"] #poda > .white,
html[data-perf-tier="very-low"] #poda > .border,
html[data-perf-tier="very-low"] #poda > .darkBorderBg { filter: none; }
