/*
 * Wow Search Modal
 * Modern modal + autocomplete search UI.
 * No Bootstrap dependency. Styles are scoped to .wsm-*.
 */

:root {
  --wsm-bg: rgba(10, 12, 16, 0.55);
  --wsm-card-bg: #ffffff;
  --wsm-border: rgba(17, 24, 39, 0.10);
  --wsm-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --wsm-text: #222;
  --wsm-muted: rgba(15, 23, 42, 0.62);
  --wsm-accent: #1f5c46;
  --wsm-accent-weak: rgba(31, 92, 70, 0.14);
  --wsm-radius: 14px;
  font-family: Inter, sans-serif;
}

body.wsm-modal-open {
  overflow: hidden;
}

/* Trigger button */
.wsm-search-trigger {
 font-family: Inter, sans-serif!important;
  display: inline-flex!important;
  align-items: center;
  gap: 10px;
  border: 1px solid #b3b3b3!important;
  background: transparent!important;
  color: #222!important;
  padding: 10px 14px!important;
  border-radius:10px!important;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.wsm-search-trigger:hover {
  border-color: rgba(15, 23, 42, 0.30);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  transform: translateY(-1px);
}

.wsm-search-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--wsm-accent-weak);
  border-color: var(--wsm-accent);
}

.wsm-search-icon {
  display: inline-flex;
  color: rgba(15, 23, 42, 0.70);
}

.wsm-search-text {
  font-weight: 700;
  font-size: 16px;
}

.wsm-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.70);
      font-family: "Inter", Sans-serif;

}

/* Overlay + modal positioning */
.wsm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: var(--wsm-bg);
  backdrop-filter: blur(10px);
}

.wsm-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 24px;
      font-family: "Inter", Sans-serif;

}

.wsm-card {
  max-width: 510px;
  width: 100%;
  background: var(--wsm-card-bg);
  border: 1px solid var(--wsm-border);
  border-radius: var(--wsm-radius);
  box-shadow: var(--wsm-shadow);
  overflow: hidden;
  transform-origin: 50% 0;
  animation: wsm-pop 160ms ease-out;
    font-family: "Inter", Sans-serif;

}

@keyframes wsm-pop {
  from {
    transform: translateY(-10px) scale(0.985);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.wsm-header {
  display: flex;
  align-items: center;
  justify-content:flex-end;
  padding: 7px 7px 10px;
}

.wsm-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(15, 23, 42, 0.65);
}

.wsm-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none!important;
  background:transparent!important;
  color: rgba(15, 23, 42, 1)!important;
  font-size: 22px;
  line-height: 1;
  border:none!important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: end;
  transition: background 120ms ease, border-color 120ms ease;
}

.wsm-close:hover , .wsm-close:focus{
  background:transparent!important;
  color: rgba(15, 23, 42, 1)!important;

}

.wsm-close:focus-visible {
  outline: none;
  box-shadow:none!important;
  border-color: var(--wsm-accent);
}

.wsm-input-wrap {
  position: relative;
  padding: 0 18px 14px;
}

.wsm-input-icon {
  position: absolute;
  left: 30px;
  top: 12px;
  color: rgba(15, 23, 42, 0.40);
}

.wsm-input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #e5e7eb!important;
  background: #fff;
  padding: 0 16px 0 44px!important;
  font-size: 16px;
  font-weight: 600;
  color: var(--wsm-text);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.wsm-input::placeholder {
  color: rgba(15, 23, 42, 0.42);
  font-weight: 500;
}

.wsm-input:focus {
  outline: none;
  border-color: var(--wsm-accent);
  box-shadow: none;
}

.wsm-loading {
  position: absolute;
  right: 30px;
  top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(15, 23, 42, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.wsm-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(15, 23, 42, 0.15);
  border-top-color: var(--wsm-accent);
  border-radius: 50%;
  animation: wsm-spin 700ms linear infinite;
}

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

.wsm-body {
  padding: 0 10px 4px;
  text-align: center;
}

.wsm-status {
  padding: 8px 12px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 14px;
  font-weight: 600;
}

.wsm-results {
  padding: 0 8px 10px;
  max-height: min(52vh, 520px);
  overflow: auto;
}

.wsm-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.wsm-result:hover,
.wsm-result.is-active {
  background: #9e9e9e;
  border-color: rgba(15, 23, 42, 0.10);
  transform: translateY(-1px);
}

.wsm-result:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--wsm-accent-weak);
  border-color: var(--wsm-accent);
}

.wsm-result-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(31, 92, 70, 0.10);
  color: var(--wsm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
  display: none;
}
.result-inner{
      display: grid;
    grid-template-columns: 90% 10%;
}
.wsm-result-body{
  text-align: left;
}

.wsm-result-main {
  flex: 1 1 auto;
  min-width: 0;
}

.wsm-result-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.wsm-result-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--wsm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wsm-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.70);
  text-transform: lowercase;
}

.wsm-result-excerpt {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.62);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wsm-result-url {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.45);
}

.wsm-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
}

.wsm-tip {
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.58);
  text-align: center;
}

.wsm-footnote {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.42);
}

/* Mobile tweaks */
@media (max-width: 520px) {
  .wsm-modal { padding-top: 56px; }
  .wsm-search-text { display: none; }
  .wsm-kbd { display: none; }
}
