﻿/* search.css - aivisible site search overlay */

/* Overlay wrapper */
#srch-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 90px;
}
#srch-overlay.srch-open { display: flex; }

/* Blurred backdrop */
.srch-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Search panel card */
.srch-panel {
  position: relative; z-index: 1;
  width: calc(100% - 32px); max-width: 620px;
  background: var(--bg-white, #fff);
  border: 2px solid var(--coral, #E84C2B);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.22);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 130px);
  overflow: hidden;
}

/* Top bar: input + close */
.srch-top {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 14px 18px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.08));
  flex-shrink: 0;
}
.srch-input-wrap {
  display: flex; align-items: center; gap: 10px; flex: 1;
}
.srch-icon { color: #fff; flex-shrink: 0; }

#srch-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Inter', sans-serif; font-size: 17px;
  color: #fff; padding: 6px 0;
}
#srch-input::placeholder { color: rgba(255,255,255,0.5); }
#srch-input::-webkit-search-cancel-button { display: none; }

.srch-status {
  font-size: 12px; color: var(--text-muted, #9B8880);
  white-space: nowrap; flex-shrink: 0;
}

#srch-close {
  background: var(--bg, #FBF7F5);
  border: 1px solid var(--border, rgba(0,0,0,0.1));
  color: var(--text-muted, #9B8880);
  border-radius: 7px; padding: 5px 10px;
  font-size: 11px; font-weight: 600; font-family: 'Inter', sans-serif;
  cursor: pointer; flex-shrink: 0; transition: all 0.15s;
}
#srch-close:hover { border-color: var(--coral, #E84C2B); color: var(--coral, #E84C2B); }

/* Results area */
#srch-results { overflow-y: auto; }

.srch-list { list-style: none; padding: 6px 0; margin: 0; }

.srch-item { border-bottom: 1px solid var(--border, rgba(0,0,0,0.06)); }
.srch-item:last-child { border-bottom: none; }

.srch-link {
  display: block; padding: 13px 18px;
  text-decoration: none; transition: background 0.12s;
}
.srch-link:hover, .srch-link:focus {
  background: var(--bg, #FBF7F5); outline: none;
}

.srch-row {
  display: flex; align-items: center; gap: 9px; margin-bottom: 3px;
}

/* Section tags */
.srch-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 2px 8px; border-radius: 100px;
  flex-shrink: 0; line-height: 1.6;
}
.srch-tag-blue   { background: var(--blue-t,  rgba(0,123,189,0.09));  color: var(--blue,  #007BBD); }
.srch-tag-coral  { background: var(--coral-t, rgba(232,76,43,0.09));  color: var(--coral, #E84C2B); }
.srch-tag-green  { background: rgba(5,150,105,0.09); color: var(--green, #059669); }
.srch-tag-muted  { background: var(--bg, #FBF7F5); color: var(--text-muted, #9B8880); }

.srch-title {
  font-size: 15px; font-weight: 600;
  color: var(--text, #1A1614); line-height: 1.3;
}
.srch-snip {
  font-size: 13px; color: var(--text-muted, #9B8880);
  line-height: 1.55; padding-left: 1px;
}

/* Empty / loading states */
.srch-state {
  padding: 36px 20px; text-align: center;
  font-size: 15px; color: var(--text-mid, #4A3F3A);
}
.srch-empty p { margin-bottom: 6px; }
.srch-note { font-size: 13px; color: var(--text-muted, #9B8880); }

/* Nav search button */
#srch-btn {
  height: 34px; padding: 0 16px 0 13px;
  border-radius: var(--pill, 999px);
  border: 2px solid var(--coral, #E84C2B);
  background: transparent;
  cursor: pointer; display: flex; align-items: center; gap: 7px;
  color: var(--text, #1A1614); flex-shrink: 0; transition: all 0.2s;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
}
#srch-btn:hover { background: var(--coral, #E84C2B); color: #fff; }
#srch-btn:hover svg { stroke: #fff; }
.srch-btn-label {
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
}
@media (max-width: 768px) {
  #srch-btn { width: 34px; padding: 0; border-radius: 50%; justify-content: center; }
  .srch-btn-label { display: none; }
}

@media (max-width: 768px) {
  #srch-overlay { padding-top: 75px; }
  .srch-panel { width: calc(100% - 24px); border-radius: 16px; }
  #srch-input { font-size: 16px; }
}
