/* ============================================================
   BarqNews Pro — 06 — Search Overlay
   ============================================================ */

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1001;
  background: var(--header-bg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
  display: flex;
  align-items: center;
  padding: 0 var(--glob-gap);
  border-bottom: 1px solid var(--border-color);
}

.search-overlay.active {
  transform: translateY(0);
  opacity: 1;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.search-icon {
  font-size: 18px;
  color: var(--text-muted);
}

.search-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-color);
  font-family: var(--site-font);
  font-size: 18px;
  height: 100%;
  padding: 0 8px;
}
.search-field::placeholder { color: var(--text-muted); }

.search-overlay-close {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-color);
  font-size: 18px;
  transition: background var(--transition-fast);
}
.search-overlay-close:hover { background: var(--light-bg); }

/* اقتراحات البحث */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--glob-border-radius) var(--glob-border-radius);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
  display: none;
}
.search-overlay.active .search-suggestions { display: block; }

.search-suggestions .sg-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 8px 12px 4px;
  font-weight: 600;
}
.search-suggestions a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-color);
  transition: background var(--transition-fast);
}
.search-suggestions a:hover { background: var(--light-bg); }
.search-suggestions a i { color: var(--text-muted); font-size: 12px; }
.search-suggestions a .badge {
  margin-right: auto;
  font-size: 11px;
  background: var(--light-bg);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}
