/* ============================================================
   Search Overlay — Styles
   ============================================================ */

.search-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  animation: search-backdrop-in .15s ease;
}
.search-dialog {
  background: #fff; border-radius: 12px; width: 600px; max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
  animation: search-dialog-in .2s ease;
  overflow: hidden;
}
.search-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid #e0e0e0;
}
.search-icon { font-size: 22px; color: rgba(0,0,0,.4); }
.search-input {
  flex: 1; border: none; outline: none; font-size: 16px;
  font-family: 'Roboto', sans-serif; color: #333; background: transparent;
}
.search-input::placeholder { color: rgba(0,0,0,.3); }
.search-kbd {
  font-size: 11px; padding: 2px 6px; background: #f5f5f5;
  border: 1px solid #e0e0e0; border-radius: 4px; color: rgba(0,0,0,.4);
  font-family: 'Roboto Mono', monospace;
}

/* Results */
.search-results {
  max-height: 400px; overflow-y: auto;
}
.search-empty {
  padding: 32px 16px; text-align: center; color: rgba(0,0,0,.35);
  font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.search-empty .mdi { font-size: 32px; }

.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer; transition: background .1s;
}
.search-result:hover,
.search-result.selected { background: #E8F5E9; }
.search-result__icon { font-size: 20px; color: #4CAF50; flex-shrink: 0; }
.search-result__text { flex: 1; min-width: 0; }
.search-result__title { font-size: 14px; color: #333; font-weight: 500; }
.search-result__title mark { background: #FFF9C4; border-radius: 2px; padding: 0 2px; }
.search-result__desc { font-size: 12px; color: rgba(0,0,0,.45); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result__type {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  color: rgba(0,0,0,.35); background: #f5f5f5; padding: 2px 8px;
  border-radius: 10px; white-space: nowrap; flex-shrink: 0;
}

/* Footer */
.search-footer {
  display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid #e0e0e0;
  font-size: 11px; color: rgba(0,0,0,.35);
}
.search-footer kbd {
  font-size: 10px; padding: 1px 4px; background: #f5f5f5;
  border: 1px solid #e0e0e0; border-radius: 3px;
  font-family: 'Roboto Mono', monospace; margin-right: 2px;
}

/* Animations */
@keyframes search-backdrop-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes search-dialog-in {
  from { opacity: 0; transform: translateY(-20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === DARK MODE === */
[data-theme="dark"] .search-dialog { background: #16213e; box-shadow: 0 16px 48px rgba(0,0,0,.5); }
[data-theme="dark"] .search-header { border-color: #2a2a4a; }
[data-theme="dark"] .search-input { color: #e0e0e0; }
[data-theme="dark"] .search-input::placeholder { color: rgba(255,255,255,.3); }
[data-theme="dark"] .search-kbd { background: #1c2a4a; border-color: #2a2a4a; color: rgba(255,255,255,.4); }
[data-theme="dark"] .search-empty { color: rgba(255,255,255,.3); }
[data-theme="dark"] .search-result:hover,
[data-theme="dark"] .search-result.selected { background: #1c3a2e; }
[data-theme="dark"] .search-result__title { color: #e0e0e0; }
[data-theme="dark"] .search-result__desc { color: rgba(255,255,255,.4); }
[data-theme="dark"] .search-result__type { color: rgba(255,255,255,.3); background: #1c2a4a; }
[data-theme="dark"] .search-footer { border-color: #2a2a4a; color: rgba(255,255,255,.3); }
[data-theme="dark"] .search-footer kbd { background: #1c2a4a; border-color: #2a2a4a; }
