@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

#sswWidget {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-family: 'Inter', sans-serif !important;
  position: relative !important;
  display: block !important;
}

#sswWidget .ssw-widget-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 0 8px 0 18px !important;
  height: 62px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04) !important;
  cursor: text !important;
  transition: border-color 0.2s, box-shadow 0.2s, border-radius 0.2s !important;
  overflow: visible !important;
}

#sswWidget .ssw-widget-bar:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 6px 20px rgba(0,0,0,0.05) !important;
}

#sswWidget .ssw-widget-bar.is-open {
  border-color: #e2e8f0 !important;
  border-bottom-color: #ffffff !important;
  border-radius: 14px 14px 0 0 !important;
  box-shadow: none !important;
}

#sswWidget .ssw-widget-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #0f172a !important;
  caret-color: #64748b !important;
  letter-spacing: -0.01em !important;
  padding: 0 0 0 4px !important;
  margin: 0 !important;
  height: auto !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: block !important;
}

#sswWidget .ssw-widget-input::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

#sswWidget .ssw-widget-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 44px !important;
  height: 44px !important;
  background: #0f172a !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: background 0.18s, transform 0.1s, box-shadow 0.18s !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

#sswWidget .ssw-widget-btn:hover {
  background: #364fd9 !important;
  box-shadow: 0 4px 14px rgba(54,79,217,0.45) !important;
}

#sswWidget .ssw-widget-btn:active {
  transform: scale(0.95) !important;
}

#sswWidget .ssw-widget-btn svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  stroke: #ffffff !important;
  stroke-width: 2.2px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  flex-shrink: 0 !important;
}

/* ── Dropdown — appended to body ── */
.ssw-widget-dropdown {
  display: none;
  position: fixed;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 2147483647;
  max-height: 360px; /* JS overrides this dynamically */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.ssw-widget-dropdown::-webkit-scrollbar { width: 4px; }
.ssw-widget-dropdown::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.ssw-widget-dropdown.visible {
  display: block;
  animation: ssw-slide-in 0.15s ease;
}

@keyframes ssw-slide-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ssw-widget-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
  transition: background 0.1s;
  position: relative;
  box-sizing: border-box;
}

.ssw-widget-result::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: #cbd5e1;
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.ssw-widget-result:hover,
.ssw-widget-result.active { background: #f8fafc; }

.ssw-widget-result:hover::before,
.ssw-widget-result.active::before { opacity: 1; }

.ssw-widget-icon-wrap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ssw-widget-icon-wrap.post { background: #eff6ff; }
.ssw-widget-icon-wrap.page { background: #f5f3ff; }

.ssw-widget-icon { width: 15px; height: 15px; }
.ssw-widget-icon.post { color: #3b82f6; }
.ssw-widget-icon.page { color: #8b5cf6; }

.ssw-widget-title {
  flex: 1;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.ssw-widget-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #cbd5e1;
  opacity: 0;
  transition: opacity 0.15s;
}

.ssw-widget-result:hover .ssw-widget-arrow,
.ssw-widget-result.active .ssw-widget-arrow { opacity: 1; }

.ssw-widget-status {
  padding: 18px 16px;
  font-size: 13.5px;
  color: #94a3b8;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ssw-widget-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #e2e8f0;
  border-top-color: #64748b;
  border-radius: 50%;
  animation: ssw-spin 0.55s linear infinite;
  flex-shrink: 0;
}

@keyframes ssw-spin { to { transform: rotate(360deg); } }
