/*
 * search.css — Search modal overlay, input, results, suggestion chips
 * Shared by ALL pages
 * Dr Samir Contractor Website
 */

/* ══════════════════════════════════════
   SEARCH MODAL
══════════════════════════════════════ */
#searchTrigger {
  background: none; border: none; cursor: pointer; padding: 2px;
  display: inline-flex; align-items: center;
  color: rgba(255,255,255,.85); transition: color .18s;
}
#searchTrigger:hover { color: #fff; }

/* Overlay */
#searchOverlay {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,25,40,.6);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  padding: clamp(60px,10vh,110px) 16px 16px;
  justify-content: center; align-items: flex-start;
}
#searchOverlay.open { display: flex; }

/* Modal box */
.search-modal {
  background: #fff; border-radius: 12px;
  width: 100%; max-width: 640px;
  box-shadow: 0 24px 64px rgba(10,25,40,.3);
  overflow: hidden;
  animation: srchIn .2s cubic-bezier(.2,.7,.2,1);
}
@keyframes srchIn { from { opacity:0; transform:translateY(-14px); } to { opacity:1; transform:translateY(0); } }

/* Header */
.search-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem .75rem 1.25rem;
  background: var(--bg-soft); border-bottom: 1px solid var(--rule);
}
.search-head-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.search-head-close {
  background: none; border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: background .15s, color .15s;
}
.search-head-close:hover { background: var(--rule); color: var(--ink); }

/* Input row */
.search-input-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1rem .85rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.search-input-row svg { color: var(--muted); flex-shrink: 0; }
#searchInput {
  flex: 1; border: none; outline: none; min-width: 0;
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: transparent;
}
#searchInput::placeholder { color: var(--muted); }
#searchClearBtn {
  background: none; border: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  color: var(--muted); transition: background .15s, color .15s; flex-shrink: 0;
}
#searchClearBtn.visible { display: flex; }
#searchClearBtn:hover { background: var(--rule); color: var(--ink); }

/* Suggestions (shown when query empty) */
#searchSuggestions { padding: 1rem 1.25rem 1.25rem; }
.srch-suggest-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .65rem;
}
.srch-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.srch-chip {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 999px; padding: .32rem .8rem;
  font-family: var(--body); font-size: .8rem; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.srch-chip:hover {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue); color: var(--brand-blue);
}

/* Results list */
#searchResults { max-height: 380px; overflow-y: auto; }
.srch-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .8rem 1.25rem; text-decoration: none;
  border-bottom: 1px solid var(--rule); transition: background .15s;
}
.srch-item:last-child { border-bottom: none; }
.srch-item:hover { background: var(--bg-soft); }
.srch-item-icon {
  width: 34px; height: 34px; border-radius: 7px; flex-shrink: 0;
  background: var(--brand-blue-soft); color: var(--brand-blue);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.srch-item-icon svg { width: 15px; height: 15px; }
.srch-item-title {
  font-size: .9rem; font-weight: 600; color: var(--ink); line-height: 1.35;
}
.srch-item-title mark { background: none; color: var(--brand-blue); font-weight: 700; }
.srch-item-desc { font-size: .78rem; color: var(--ink-3); line-height: 1.4; margin-top: .15rem; }
.srch-item-tag {
  display: inline-block; margin-top: .3rem;
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-green-deep);
  background: rgba(28,177,113,.09); border-radius: 4px;
  padding: .08rem .38rem;
}
.srch-empty {
  padding: 2rem 1.25rem; text-align: center;
  font-size: .9rem; color: var(--ink-3);
}
.srch-empty strong { color: var(--ink); }
