/* ===== GKSC Site Search — Modal ===== */
#gksc-search-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  opacity: 0; visibility: hidden; transition: all 0.2s ease;
}
#gksc-search-overlay.open { opacity: 1; visibility: visible; }

.gksc-search-modal {
  width: 100%; max-width: 680px;
  background: #1e293b; border: 1px solid #334155; border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.5);
  overflow: hidden; max-height: 70vh; display: flex; flex-direction: column;
  transform: translateY(-20px) scale(0.98); transition: transform 0.2s ease;
}
#gksc-search-overlay.open .gksc-search-modal { transform: translateY(0) scale(1); }

.gksc-search-bar {
  display: flex; align-items: center; padding: 4px 8px 4px 18px;
  border-bottom: 1px solid #334155; flex-shrink: 0;
}
.gksc-search-icon { color: #64748b; flex-shrink: 0; }
#gksc-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: #f1f5f9; font-size: 16px; padding: 16px 12px;
}
#gksc-search-input::placeholder { color: #64748b; }
.gksc-search-esc {
  padding: 3px 8px; border-radius: 4px; font-size: 11px;
  background: #334155; color: #94a3b8; border: 1px solid #475569; margin-right: 8px;
}
.gksc-search-close {
  width: 36px; height: 36px; border-radius: 8px; border: none;
  background: transparent; color: #64748b; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.gksc-search-close:hover { background: #334155; color: #f1f5f9; }

.gksc-search-results { overflow-y: auto; padding: 8px; }

.gksc-search-loading, .gksc-search-empty {
  padding: 40px 20px; text-align: center; color: #64748b; font-size: 14px;
}
.gksc-search-empty-icon { font-size: 32px; margin-bottom: 12px; }
.gksc-search-empty-hint { font-size: 12px; color: #475569; margin-top: 8px; }

.gksc-search-count { padding: 8px 12px; font-size: 12px; color: #64748b; }

.gksc-result-item {
  display: block; padding: 14px 16px; border-radius: 10px;
  text-decoration: none; color: inherit; transition: background 0.15s;
}
.gksc-result-item:hover, .gksc-result-item.active { background: #334155; }
.gksc-result-url { font-size: 12px; color: #3b82f6; margin-bottom: 4px; }
.gksc-result-title { font-size: 15px; font-weight: 600; color: #f1f5f9; margin-bottom: 6px; }
.gksc-result-excerpt { font-size: 13px; color: #94a3b8; line-height: 1.5; }
.gksc-result-excerpt mark, .gksc-result-excerpt .relevanssi-query-term {
  background: none !important; color: #3b82f6 !important; font-weight: 600;
}
.gksc-result-tags { display: flex; gap: 6px; margin-top: 8px; }
.gksc-tag {
  padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 600;
  background: #334155; color: #94a3b8;
}
.gksc-tag-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.gksc-tag-green { background: rgba(16,185,129,0.15); color: #34d399; }

.gksc-search-all {
  display: block; text-align: center; padding: 14px;
  color: #3b82f6; font-size: 14px; font-weight: 600;
  text-decoration: none; border-top: 1px solid #334155; margin-top: 8px;
}
.gksc-search-all:hover { background: rgba(59,130,246,0.08); border-radius: 0 0 12px 12px; }

/* ===== Header Search Button ===== */
.gksc-header-search {
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: #94a3b8;
}
.gksc-header-search:hover { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* ===== Footer Search ===== */
.gksc-footer-search {
  text-align: center; padding: 40px 20px;
  border-top: 1px solid #334155; margin-top: 20px;
}
.gksc-footer-search-label { font-size: 14px; color: #94a3b8; margin-bottom: 14px; }
.gksc-footer-search-bar {
  display: inline-flex; align-items: center; gap: 10px;
  background: #1e293b; border: 1px solid #334155; border-radius: 10px;
  padding: 12px 24px; cursor: pointer; transition: all 0.2s;
  color: #64748b; font-size: 14px;
}
.gksc-footer-search-bar:hover { border-color: #3b82f6; color: #94a3b8; }

/* ===== 404 Page Search ===== */
.gksc-404-search {
  text-align: center; padding: 60px 20px; max-width: 500px; margin: 0 auto;
}
.gksc-404-search h2 { font-size: 18px; color: #f1f5f9; margin-bottom: 20px; }
.gksc-404-search-bar {
  display: inline-flex; align-items: center; gap: 12px;
  background: #1e293b; border: 2px solid #334155; border-radius: 14px;
  padding: 16px 32px; cursor: pointer; transition: all 0.2s;
  color: #64748b; font-size: 16px; width: 100%; justify-content: center;
}
.gksc-404-search-bar:hover { border-color: #3b82f6; color: #94a3b8; }
.gksc-404-links { margin-top: 30px; }
.gksc-404-links p { color: #64748b; font-size: 13px; margin-bottom: 12px; }
.gksc-404-links a {
  display: inline-block; margin: 0 8px; padding: 6px 16px;
  background: #334155; border-radius: 8px; color: #94a3b8;
  text-decoration: none; font-size: 13px; transition: all 0.2s;
}
.gksc-404-links a:hover { background: #3b82f6; color: #fff; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  #gksc-search-overlay { padding-top: 0; align-items: stretch; }
  .gksc-search-modal { max-width: 100%; max-height: 100vh; border-radius: 0; }
  .gksc-search-esc { display: none; }
}
