/* Pigskin Site Finder */
.pgsf-widget {
  width: 100%;
  margin: 1.5rem 0;
}

.pgsf-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 760px;
}

.pgsf-form label {
  flex: 1;
  min-width: 0;
}

.pgsf-form input[type="search"] {
  width: 100%;
  min-height: 48px;
  border: 2px solid rgba(0,0,0,.18);
  border-radius: 999px;
  background: #fffaf0;
  color: #111;
  padding: 0 18px;
  font-size: 1rem;
}

.pgsf-form button,
.pgsf-result-jump,
.pgsf-floating button,
.pgsf-floating-open {
  border: 0;
  border-radius: 999px;
  background: #004aad;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 18px;
  min-height: 44px;
}

.pgsf-form button:hover,
.pgsf-form button:focus,
.pgsf-result-jump:hover,
.pgsf-result-jump:focus,
.pgsf-floating button:hover,
.pgsf-floating button:focus,
.pgsf-floating-open:hover,
.pgsf-floating-open:focus {
  background: #d95400;
}

.pgsf-results {
  max-width: 900px;
  margin-top: 14px;
}

.pgsf-results-status {
  margin: 0 0 10px;
  font-weight: 800;
}

.pgsf-result-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pgsf-result-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.55);
}

.pgsf-result-card a {
  color: #111;
  font-weight: 900;
  text-transform: uppercase;
}

.pgsf-result-meta {
  color: #5c574d;
  font-size: .86rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pgsf-result-snippet {
  margin: 0;
  color: #2f2a25;
  line-height: 1.45;
}

.pgsf-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.pgsf-highlight {
  background: var(--pgsf-highlight, #fff176);
  color: #111;
  border-radius: 3px;
  padding: 0 .08em;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.pgsf-highlight.pgsf-active {
  background: var(--pgsf-active, #ff8c00);
  color: #111;
  box-shadow: 0 0 0 3px rgba(255,140,0,.35);
}

.pgsf-floating {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(920px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 999px;
  background: rgba(255,250,240,.96);
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
  transform: translateX(-50%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pgsf-floating-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  padding: 0 8px;
}

.pgsf-floating-count {
  color: #5c574d;
  font-weight: 700;
  white-space: nowrap;
}

.pgsf-floating button {
  min-height: 34px;
  padding: 0 12px;
  font-size: .88rem;
}

.pgsf-floating button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.pgsf-floating-panel {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 999998;
  width: min(720px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 140px));
  overflow: auto;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 14px;
  background: #fffaf0;
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
  transform: translateX(-50%);
  padding: 14px;
}

.pgsf-floating-panel[hidden] {
  display: none;
}

.pgsf-floating-panel h3 {
  margin: 0 0 10px;
}

.pgsf-floating-panel ol {
  margin: 0;
  padding-left: 1.3rem;
}

.pgsf-floating-panel li {
  margin-bottom: 8px;
}

.pgsf-floating-panel a {
  font-weight: 800;
}

.pgsf-floating-open {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999990;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.pgsf-floating-widget {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 999991;
  width: min(420px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 14px;
  background: #fffaf0;
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
}

.pgsf-floating-widget[hidden] {
  display: none;
}

.pgsf-widget-compact .pgsf-form {
  display: grid;
  grid-template-columns: 1fr auto;
}

@media (max-width: 720px) {
  .pgsf-form,
  .pgsf-widget-compact .pgsf-form {
    grid-template-columns: 1fr;
    display: grid;
  }

  .pgsf-form button {
    width: 100%;
  }

  .pgsf-floating {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    border-radius: 16px;
    flex-wrap: wrap;
  }

  .pgsf-floating-title {
    flex: 1 1 100%;
  }

  .pgsf-floating button {
    flex: 1 1 auto;
  }

  .pgsf-floating-panel {
    bottom: 138px;
  }
}

/* Sticky left site-wide search panel */
.pgsf-sticky-left-widget {
  position: fixed;
  left: 18px;
  top: var(--pgsf-sticky-top, 160px);
  z-index: 999980;
  width: var(--pgsf-sticky-width, 320px);
  max-width: calc(100vw - 36px);
  padding: 14px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,250,240,.94)),
    repeating-linear-gradient(90deg, rgba(0,0,0,.025) 0 1px, transparent 1px 16px);
  box-shadow: 0 18px 50px rgba(0,0,0,.20);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pgsf-sticky-left-title {
  margin: 0 0 10px;
  color: #111;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pgsf-sticky-left-widget .pgsf-widget {
  margin: 0;
}

.pgsf-sticky-left-widget .pgsf-widget-compact .pgsf-form,
.pgsf-sticky-left-widget .pgsf-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: none;
}

.pgsf-sticky-left-widget .pgsf-form input[type="search"] {
  min-height: 40px;
  padding: 0 13px;
  font-size: .92rem;
  border-radius: 10px;
}

.pgsf-sticky-left-widget .pgsf-form button {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: .9rem;
}

.pgsf-sticky-left-widget .pgsf-results {
  max-width: none;
  max-height: min(430px, calc(100vh - var(--pgsf-sticky-top, 160px) - 42px));
  overflow: auto;
  margin-top: 10px;
  padding-right: 3px;
}

.pgsf-sticky-left-widget .pgsf-results-status {
  font-size: .9rem;
  line-height: 1.35;
}

.pgsf-sticky-left-widget .pgsf-result-list {
  gap: 8px;
}

.pgsf-sticky-left-widget .pgsf-result-card {
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}

.pgsf-sticky-left-widget .pgsf-result-card a {
  font-size: .9rem;
  line-height: 1.15;
}

.pgsf-sticky-left-widget .pgsf-result-meta {
  font-size: .78rem;
}

.pgsf-sticky-left-widget .pgsf-result-snippet {
  font-size: .85rem;
}

@media (max-width: 1180px) {
  .pgsf-sticky-left-widget {
    display: none !important;
  }
}
