/* ===== Ziyomap Qidiruv Modali (Search Modal) ===== */
.zy-search-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.zy-search-overlay.open { display: flex; }

.zy-search-box {
  width: 100%; max-width: 540px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  animation: zySearchIn 0.3s ease;
  overflow: hidden;
}
body.dark-theme .zy-search-box { background: #1e293b; }

@keyframes zySearchIn {
  from { transform: scale(0.95) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.zy-search-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
body.dark-theme .zy-search-header { border-color: #334155; }
.zy-search-header > i { color: #9ca3af; font-size: 1.1rem; flex-shrink: 0; }
body.dark-theme .zy-search-header > i { color: #64748b; }

.zy-search-input {
  flex: 1; min-width: 0;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem; font-weight: 600;
  font-family: inherit; outline: none;
  background: #f9fafb; color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.zy-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  background: #fff;
}
.zy-search-input::placeholder { color: #9ca3af; font-weight: 400; }
body.dark-theme .zy-search-input {
  border-color: #475569; background: #0f172a; color: #f1f5f9;
}
body.dark-theme .zy-search-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.2);
  background: #1e293b;
}

.zy-search-close {
  width: 36px; height: 36px; border-radius: 10px;
  background: #f3f4f6; border: none;
  color: #6b7280; font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s;
}
.zy-search-close:hover { background: #e5e7eb; }
body.dark-theme .zy-search-close { background: #334155; color: #94a3b8; }
body.dark-theme .zy-search-close:hover { background: #475569; }

.zy-search-body {
  padding: 16px 20px;
  max-height: 420px; overflow-y: auto;
  scrollbar-width: thin;
}
.zy-search-body::-webkit-scrollbar { width: 4px; }
.zy-search-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
body.dark-theme .zy-search-body::-webkit-scrollbar-thumb { background: #475569; }

.zy-sg-label {
  font-size: 12px; font-weight: 800; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px;
}
body.dark-theme .zy-sg-label { color: #94a3b8; }

.zy-sg-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.zy-sg-chip {
  display: inline-block; padding: 8px 16px; border-radius: 20px;
  background: #f3f4f6; border: 1px solid #e5e7eb;
  color: #374151; font-size: 13px; font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.zy-sg-chip:hover { background: #e5e7eb; }
body.dark-theme .zy-sg-chip {
  background: #1e293b; border-color: #334155; color: #e2e8f0;
}
body.dark-theme .zy-sg-chip:hover { background: #334155; }

.zy-sg-links { display: flex; flex-direction: column; gap: 6px; }

.zy-sg-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  text-decoration: none; color: #374151;
  font-weight: 600; font-size: 14px;
  transition: background 0.2s;
}
.zy-sg-link:hover { background: #f3f4f6; }
body.dark-theme .zy-sg-link { color: #e2e8f0; }
body.dark-theme .zy-sg-link:hover { background: #1e293b; }

.zy-sg-link i {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}

.zy-sg-empty {
  text-align: center; color: #9ca3af; padding: 24px; font-size: 14px;
}
body.dark-theme .zy-sg-empty { color: #64748b; }

.zy-search-result {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 12px;
  text-decoration: none; color: #374151;
  transition: background 0.2s;
}
.zy-search-result:hover { background: #f3f4f6; }
body.dark-theme .zy-search-result { color: #e2e8f0; }
body.dark-theme .zy-search-result:hover { background: #1e293b; }

.zy-search-result i {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.zy-search-result-info { flex: 1; min-width: 0; }
.zy-search-result-title { font-weight: 700; font-size: 14px; }
.zy-search-result-desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
body.dark-theme .zy-search-result-desc { color: #94a3b8; }

@media(max-width:480px){
  .zy-search-box{ border-radius:16px; }
  .zy-search-header{ padding:12px 14px; gap:8px; }
  .zy-search-body{ padding:12px 14px; }
  .zy-search-input{ padding:10px 12px; font-size:0.9rem; }
}
