/* =============================================================================
   SEARCH PAGE — C-143
   Enterprise Search page styles (SEARCH-001-P1)
   Namespace: sch-*
   URL contract: /search/
   Loaded: search.html only (per-page <link> — not in main.css)
============================================================================= */


/* =============================================================================
   SECTION 2: Search Panel
   .sch-form — search input + submit button
============================================================================= */

.sch-panel {
  padding-block: var(--space-2xl, 4rem) var(--space-xl, 2.5rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.sch-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 760px;
  margin-inline: auto;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sch-form:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(var(--blue-rgb, 17 78 150) / 0.12);
}

.sch-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-inline: 1.125rem;
}

.sch-icon {
  flex-shrink: 0;
  color: var(--mid, #6b7280);
}

.sch-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sch-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1.0625rem;
  color: var(--dark);
  padding-block: 1.125rem;
  min-width: 0;
}

.sch-input::placeholder {
  color: var(--mid, #9ca3af);
  font-weight: 400;
}

/* Override default .input border when inside .sch-form */
.sch-form .sch-input {
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.sch-submit {
  border-radius: 0;
  padding-inline: 1.75rem;
  flex-shrink: 0;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


/* =============================================================================
   RESULTS HEADER
   Count line + state message
============================================================================= */

.sch-results-header {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.sch-results-count {
  font-size: 0.875rem;
  color: var(--mid, #6b7280);
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}


/* =============================================================================
   EMPTY / NO-RESULTS STATE
   .sch-state — shown before search or when query yields nothing
============================================================================= */

.sch-state {
  max-width: 760px;
  margin-inline: auto;
  padding-block: 3rem;
  text-align: center;
}

.sch-state-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--line, #e5e7eb);
}

.sch-state-heading {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.sch-state-message {
  font-size: 0.9375rem;
  color: var(--mid, #6b7280);
  max-width: 36ch;
  margin-inline: auto;
}

/* Default (pre-search) state messaging */
.sch-state[data-state="initial"] .sch-state-heading::after {
  content: "";
}

.sch-state[data-state="initial"] .sch-state-message::after {
  content: "Enter a keyword above to search across products, resources, media, and more.";
}


/* =============================================================================
   RESULTS LIST
   .sch-results-list — grid of result cards
============================================================================= */

.sch-results-list {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* [CMS: Each .sch-result-card maps to a WP search result] */
.sch-result-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.sch-result-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.06);
  transform: translateY(-1px);
}

.sch-result-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 0.375rem;
}

.sch-result-title {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
  margin: 0 0 0.375rem;
}

.sch-result-title a {
  color: inherit;
  text-decoration: none;
}

.sch-result-title a:hover {
  color: var(--blue);
}

.sch-result-title a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.sch-result-desc {
  font-size: 0.9rem;
  color: var(--mid, #4b5563);
  line-height: 1.6;
  margin: 0 0 0.5rem;
}

.sch-result-url {
  font-size: 0.8125rem;
  color: var(--mid, #9ca3af);
  font-family: var(--font-body);
}


/* =============================================================================
   RESULTS SECTION WRAPPER
============================================================================= */

.sch-results-section {
  padding-block: var(--space-xl, 2.5rem) var(--space-2xl, 4rem);
  background: var(--bg, #f9fafb);
  min-height: 320px;
}


/* =============================================================================
   RESPONSIVE
============================================================================= */

@media (max-width: 880px) {
  .sch-panel {
    padding-block: var(--space-xl, 2.5rem) 1.5rem;
  }

  .sch-form {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .sch-form {
    flex-direction: column;
    border-radius: var(--radius-md, 8px);
    overflow: visible;
    border: none;
    gap: 0.75rem;
  }

  .sch-form:focus-within {
    box-shadow: none;
  }

  .sch-input-wrap {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-md, 8px);
    transition: border-color 0.2s;
  }

  .sch-input-wrap:focus-within {
    border-color: var(--blue);
  }

  .sch-submit {
    border-radius: var(--radius-md, 8px);
    width: 100%;
    justify-content: center;
    padding-block: 0.875rem;
  }

  .sch-result-card {
    padding: 1rem 1.125rem;
  }

  .sch-state {
    padding-block: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sch-result-card {
    transition: none;
  }
}
