/*
 * Search Styles – 4D King Results
 *
 * Covers the search bar (used on All Results, 404, etc.),
 * the search results page, and the no‑results fallback.
 */

/* ── Search Bar (generic, can be placed in any hero) ── */
.search-bar-form {
  display: flex;
  max-width: 500px;
  margin: 20px auto 0;
  border-radius: 30px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  transition: border-color 0.3s;
}

.search-bar-form:focus-within {
  border-color: var(--white);
}

.search-bar-form input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 1rem;
  outline: none;
}

.search-bar-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.search-bar-form .search-bar-submit {
  background: none;
  border: none;
  color: var(--white);
  padding: 0 18px;
  min-height: 44px;               /* explicit comfortable tap target */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.search-bar-form .search-bar-submit:hover {
  opacity: 0.8;
}

/* ── Search results hero (compact version of home-hero) ── */
.search-hero {
  width: 100%;
  margin: 0;
  padding: 50px 20px;
  background: linear-gradient(135deg, var(--primary-red, #cc0000), #ff4444);
  color: var(--white);
  text-align: center;
}

.search-hero .hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.search-hero .hero-title span {
  text-decoration: underline;
}

.search-hero .hero-description {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* ── Results grid section ── */
.search-results {
  padding: 50px 0;
}

/* ── No‑results state ── */
.no-results {
  text-align: center;
  padding: 100px 20px;
}

.no-results-inner {
  max-width: 550px;
  margin: 0 auto;
}

.no-results-icon {
  width: 90px;
  height: 90px;
  margin-bottom: 25px;
  stroke: var(--primary-red);
  fill: none;
}

.no-results-heading {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--dark);
}

.no-results-text {
  color: var(--grey);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 40px;
}

.no-results-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* ── Quick‑search form inside no‑results (WordPress default) ── */
.no-results-search {
  margin-top: 40px;
}

.no-results-search-label {
  color: var(--grey);
  margin-bottom: 15px;
}

.no-results-search .search-form {
  display: flex;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 30px;
  overflow: hidden;
  border: 2px solid var(--light-grey);
  background: var(--white);
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.no-results-search .search-form:focus-within {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.1);
}

.no-results-search .search-form label {
  flex: 1;
  display: flex;
  align-items: center;
}

.no-results-search .search-field {
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: var(--dark);
  font-size: 1rem;
  outline: none;
}

.no-results-search .search-field::placeholder {
  color: var(--grey);
  font-style: italic;
}

.no-results-search .search-submit {
  width: 52px;
  min-width: 52px;
  height: auto;
  background: var(--primary-red);
  border: none;
  border-radius: 0 28px 28px 0;
  color: transparent;                     /* hide the "Search" text */
  cursor: pointer;
  font-size: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  transition: background-color 0.2s;
  box-sizing: border-box;
}

.no-results-search .search-submit:hover {
  background-color: var(--primary-hover, #a00000);
}

/* .blog-content-wrapper is defined in blog-feed.css (shared layout utility,
   also used here on the search results page). Not redefined in this file
   to avoid conflicting values depending on stylesheet load order — see
   chat notes for the two conflicting values that existed here previously. */

/* ── Responsive ── */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
  .search-hero {
    padding: 45px 20px;
  }
}

/* --- Mobile (≤600px) --- */
@media (max-width: 600px) {
  .search-hero {
    padding: 36px 20px;
  }

  .search-hero .hero-title {
    font-size: 1.5rem;
  }

  .no-results {
    padding: 60px 20px;
  }

  .no-results-heading {
    font-size: 1.8rem;
  }
}

/* --- Small phones (≤400px) --- */
@media (max-width: 400px) {
  .no-results {
    padding: 45px 16px;
  }

  .no-results-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 18px;
  }

  .no-results-heading {
    font-size: 1.5rem;
  }

  .no-results-text {
    font-size: 1rem;
    margin-bottom: 28px;
  }
}