/* ===== FAULKNER SEARCH INPUT STYLING ===== */

@media (min-width: 981px) {
  .faulkner-search-input {
    margin: 30px 0;
  }
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: rgb(0 93 170 / 10%);
  border-radius: 0;
  overflow: visible;
}

.search-field {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: transparent;
  font-family: var(--fira);
  font-size: var(--smallestFontMax);
  color: var(--black);
}

.search-field::placeholder {
  color: #999;
  font-style: italic;
}

.search-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  background: transparent;
  border: none;
  color: var(--Primary-Blue);
  font-family: var(--fira);
  font-size: var(--smallestFontMax);
  font-weight: 400;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-icon {
  display: inline-flex;
  align-items: center;
  width: 16px;
  height: 16px;
}

.search-icon svg path {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.search-button-text {
  white-space: nowrap;
}

/* ===== FAULKNER SEARCH RESULTS STYLING ===== */

.faulkner-search-results {
  max-width: 100%;
  margin: 0 auto;
}

.search-result-item {
  border-bottom: 1px solid rgba(0, 93, 170, 0.2);
  padding: 30px 0;
}
.search-result-item:first-child {
  padding-top: 0;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-category {
  margin-bottom: 8px;
}

.search-result-category a {
  color: var(--black);
  font-family: var(--fira);
  font-size: var(--smallestFontMax);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.search-result-category a:hover {
  color: var(--Primary-Blue);
}

.search-result-title {
  line-height: 1.4;
}

.search-result-title a {
  color: var(--Primary-Blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.search-result-title a:hover {
  color: var(--black);
}

.search-result-description {
  margin-bottom: 0;
}

.search-result-description p {
  margin: 0;
  color: var(--black);
  font-family: var(--fira);
  /* font-size: var(--smallestFontMax); */
  line-height: 1.6;
}

.search-result-more {
  color: var(--Primary-Blue);
  font-family: var(--fira);
  font-weight: 700;
  text-decoration: underline;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.search-result-more:hover {
  color: var(--black);
}

/* ===== PAGINATION STYLING ===== */

.search-results-pagination {
  margin-top: 40px;
  text-align: center;
  position: relative;
}

.search-results-pagination .page-numbers {
  display: inline-block;
  padding: 10px 15px;
  margin: 0 5px;
  background: var(--white);
  border: 1px solid rgba(0, 93, 170, 0.2);
  color: var(--Primary-Blue);
  text-decoration: none;
  font-family: var(--fira);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.search-results-pagination .page-numbers:hover,
.search-results-pagination .page-numbers.current {
  background: var(--Primary-Blue);
  color: var(--white);
  border-color: var(--Primary-Blue);
}

.search-results-pagination .page-numbers.current {
  cursor: default;
}

.search-results-pagination .page-numbers.prev,
.search-results-pagination .page-numbers.next {
  font-weight: 700;
}

.search-results-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: var(--Primary-Blue);
  cursor: default;
  padding: 10px 5px;
}

.search-results-pagination .page-numbers.dots:hover {
  background: transparent;
  color: var(--Primary-Blue);
  border: none;
}

/* AJAX-specific pagination styles */
.ajax-page-link {
  position: relative;
}

.ajax-page-link:active {
  transform: scale(0.95);
}

/* ===== LOADING OVERLAY ===== */

.faulkner-search-results {
  position: relative;
}

.search-results-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  min-height: 300px;
}

.search-results-loading p {
  margin-top: 20px;
  color: var(--Primary-Blue);
  font-family: var(--fira);
  font-size: var(--postContentFontMax);
  font-weight: 600;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 93, 170, 0.2);
  border-top-color: var(--Primary-Blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== SEARCH ERROR STYLING ===== */

.search-error {
  padding: 40px 20px;
  text-align: center;
}

.search-error p {
  color: var(--Primary-Blue);
  font-family: var(--fira);
  font-size: var(--postContentFontMax);
  font-weight: 600;
}

/* ===== RESULTS CONTAINER ===== */

.search-results-container {
  transition: opacity 0.3s ease;
}

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

/* Tablet */
@media (max-width: 981px) {
  .search-result-item {
    padding: 25px 0;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .search-result-item {
    padding: 20px 0;
  }

  .search-result-title {
    line-height: 1.3;
  }

  .search-results-pagination .page-numbers {
    padding: 8px 12px;
    margin: 0 3px;
    font-size: var(--standardFontMax);
  }
}

/* ===== ACCESSIBILITY ===== */
.search-result-title a:focus,
.search-result-category a:focus,
.search-result-more:focus,
.search-results-pagination .page-numbers:focus {
  outline: 2px solid var(--Primary-Blue);
  outline-offset: 2px;
}

/* ===== NO RESULTS MESSAGE ===== */
.faulkner-search-results p {
  /* text-align: center;
  color: var(--Primary-Blue);
  font-family: var(--fira); */
  font-size: var(--postContentFontMax);
  /* padding: 40px 20px; */
  margin: 0;
}
