/* Site-wide background (index texture) + Pagefind sidebar tweaks.
   Loaded last in BaseLayout so it overrides per-page body colors. */

body {
  background: #0d0a06 !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(
      ellipse at 20% 20%,
      rgba(201, 151, 58, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(139, 26, 26, 0.08) 0%,
      transparent 50%
    ),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9973A' fill-opacity='0.03'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.page-shell {
  position: relative;
  z-index: 1;
}

.sidebar-search {
  padding: 10px 14px 4px;
}

#pf-search {
  --pagefind-ui-scale: 0.78;
  --pagefind-ui-primary: #c9a227;
  --pagefind-ui-text: #e8dfb8;
  --pagefind-ui-background: #140e06;
  --pagefind-ui-border: rgba(201, 162, 39, 0.25);
  --pagefind-ui-tag: #1a1408;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 6px;
  --pagefind-ui-font: "Sarabun", sans-serif;
}

#pf-search input,
#pf-search input::placeholder {
  font-family: "Sarabun", sans-serif;
}

#pf-search input {
  color: var(--pagefind-ui-text);
}

#pf-search input::placeholder {
  color: var(--pagefind-ui-text);
  opacity: 0.45;
}

#pf-search .pagefind-ui__search-clear {
  font-size: 0;
  border: none;
  box-shadow: none;
}

#pf-search .pagefind-ui__search-clear:focus,
#pf-search .pagefind-ui__search-clear:hover {
  outline: none;
  box-shadow: none;
  border: none;
}

#pf-search .pagefind-ui__search-clear::after {
  content: "\2715";
  font-size: 18px;
  line-height: 1;
  color: var(--pagefind-ui-text);
}
