/* Живой поиск вакансий */
.oklad-search {
  position: relative;
  width: 100%;
}

.oklad-search__field {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.oklad-search__input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.oklad-search__input-wrap .oklad-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
}

.oklad-search__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 1px solid transparent;
  background: #f2f4f5;
  color: #0f172a;
  font-size: 16px; /* ≥16px — без авто-зума в Safari при фокусе */
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.oklad-search--header .oklad-search__input {
  height: 48px;
  border-radius: 10px;
  padding: 0 44px 0 42px;
}

.oklad-search--mobile .oklad-search__input {
  height: 52px;
  border-radius: 12px;
  padding: 0 52px 0 44px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.oklad-search__input:focus {
  background: #fff;
  border-color: var(--p24-primary, #00ba77);
  box-shadow: 0 0 0 3px var(--p24-primary-ring, rgba(0, 186, 119, 0.15));
}

/* Hero: белая карточка — .hero-search в site.css */
.hero-search .oklad-search__field {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.hero-search .oklad-search__input-wrap {
  flex: 1;
  min-width: 0;
}

.hero-search .oklad-search__input {
  width: 100%;
  border: none;
  padding: 14px 16px 14px 44px;
  font-size: 16px;
  border-radius: 10px;
  background: #f8fafc;
}

.hero-search .oklad-search__input:focus {
  outline: 2px solid var(--p24-primary, #00ba77);
  outline-offset: 0;
  background: #fff;
  border-color: transparent;
  box-shadow: none;
}

.hero-search .oklad-search__submit {
  flex-shrink: 0;
  border-radius: 10px;
  white-space: nowrap;
}

.hero-search .oklad-search__dropdown {
  top: calc(100% + 8px);
  z-index: 220;
}

.oklad-search__submit-icon {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 8px;
  cursor: pointer;
  color: #64748b;
  border-radius: 8px;
}

.oklad-search__submit-icon:hover {
  color: var(--p24-primary, #00ba77);
}

.oklad-search.is-open .oklad-search__input {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.oklad-search__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 200;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  max-height: min(380px, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.oklad-search__dropdown[hidden] {
  display: none !important;
}

.oklad-search__status {
  padding: 16px 18px;
  font-size: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.oklad-search__status a {
  color: var(--p24-primary, #00ba77);
  font-weight: 600;
}

.oklad-search__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--p24-primary, #00ba77);
  border-radius: 50%;
  animation: oklad-search-spin 0.7s linear infinite;
}

@keyframes oklad-search-spin {
  to { transform: rotate(360deg); }
}

.oklad-search-hit {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}

.oklad-search-hit:hover,
.oklad-search-hit.is-active {
  background: var(--p24-primary-bg, #ecfdf5);
}

.oklad-search-hit__main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.oklad-search-hit__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.oklad-search-hit__badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.oklad-search-hit__badge--vip {
  background: #fef3c7;
  color: #b45309;
}

.oklad-search-hit__badge--premium {
  background: #ede9fe;
  color: #6d28d9;
}

.oklad-search-hit__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: #64748b;
}

.oklad-search-hit__company {
  font-weight: 600;
  color: #475569;
}

.oklad-search-hit__salary {
  color: var(--p24-primary-deep, #007a52);
  font-weight: 600;
}

.oklad-search-hit__city::before {
  content: "·";
  margin-right: 6px;
  color: #cbd5e1;
}

.oklad-search-hit__city:first-child::before {
  display: none;
}

.oklad-search__more {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--p24-primary, #00ba77);
  text-decoration: none;
  background: #f8fafc;
}

.oklad-search__more:hover {
  background: var(--p24-primary-bg, #ecfdf5);
}

/* Мобильная панель поиска */
.mobile-search-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 16px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.mobile-search-panel.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-search-panel[hidden] {
  display: none !important;
}

.mobile-search-panel__sheet {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  transform: translateY(-12px);
  transition: transform 0.25s ease;
}

.mobile-search-panel.is-open .mobile-search-panel__sheet {
  transform: translateY(0);
}

.mobile-search-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mobile-search-panel__head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.mobile-search-panel__close {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.mobile-search-panel .oklad-search__dropdown {
  position: static;
  margin-top: 8px;
  box-shadow: none;
  border: 1px solid #e2e8f0;
  max-height: 50vh;
}
