/**
 * Global Search Styles
 */

.global-search-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.global-search-header {
  text-align: center;
  margin-bottom: 30px;
}

.global-search-header .page-title {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 10px;
}

.global-search-header .page-description {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin-bottom: 0;
}

.search-form-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
}

.global-search-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.1rem;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.global-search-input:focus {
  outline: none;
  border-color: #007bff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.search-submit,
.search-clear {
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-submit {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
}

.search-submit:hover {
  background: linear-gradient(45deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.search-clear {
  background: #6c757d;
  color: white;
}

.search-clear:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.filter-details {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.filter-toggle {
  padding: 15px 20px;
  background: #f8f9fa;
  cursor: pointer;
  font-weight: 600;
  color: #495057;
  border: none;
  list-style: none;
  outline: none;
}

.filter-toggle:hover {
  background: #e9ecef;
}

.filter-content {
  padding: 20px;
  background: #fff;
}

.entity-type-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.entity-type-filters .form-checkboxes .form-item {
  margin: 0;
  display: flex;
  align-items: center;
}

.entity-type-filters input[type="checkbox"] {
  margin-right: 10px;
  transform: scale(1.2);
}

/* Search Results */
.search-results-wrapper {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.search-results-header {
  padding: 20px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  margin: 0;
  font-size: 1.5rem;
  color: #2c3e50;
}

.results-count {
  padding: 15px 30px;
  margin: 0;
  font-weight: 600;
  color: #6c757d;
  border-bottom: 1px solid #e9ecef;
}

.no-results {
  padding: 40px 30px;
  text-align: center;
  color: #6c757d;
  font-size: 1.1rem;
}

.search-result-item {
  padding: 25px 30px;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background: #f8f9fa;
}

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

.result-header {
  margin-bottom: 15px;
}

.result-title {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  line-height: 1.4;
}

.result-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.result-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.entity-type-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 20px;
  letter-spacing: 0.5px;
  color: white;
}

.entity-type-node { background: #28a745; }
.entity-type-taxonomy_term { background: #ffc107; color: #212529; }
.entity-type-media { background: #e83e8c; }

.entity-bundle {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.updated-date {
  font-size: 0.9rem;
  color: #6c757d;
}

.result-description {
  margin: 15px 0;
  line-height: 1.6;
  color: #495057;
}

.result-description p {
  margin: 0;
}

.result-footer {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #6c757d;
}

.result-author {
  font-style: italic;
}

/* Search Help */
.search-help {
  margin-top: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.search-help summary {
  padding: 15px 20px;
  background: #f8f9fa;
  cursor: pointer;
  font-weight: 600;
  color: #495057;
  border-radius: 8px;
}

.search-help summary:hover {
  background: #e9ecef;
}

.search-tips-list {
  padding: 20px;
  margin: 0;
}

.search-tips-list li {
  margin-bottom: 8px;
  color: #6c757d;
}

/* Waiting Message */
.waiting-message {
  padding: 60px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.waiting-icon {
  margin-bottom: 20px;
}

.waiting-icon i {
  font-size: 1.5rem;
  color: #6c757d;
  opacity: 0.6;
}

.waiting-title {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

.waiting-text {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

/* Pagination Styles */
.pagination-section {
  margin-top: 40px;
  padding: 20px 0;
}

.pagination-section .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Custom pager styling to match the site design */
.pager__items {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
  align-items: center;
}

.pager__item {
  margin: 0;
}

.pager__item a,
.pager__item span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  text-decoration: none;
  color: #495057;
  background: #fff;
  transition: all 0.2s ease;
  font-weight: 500;
}

.pager__item a:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
  text-decoration: none;
}

.pager__item.is-active span {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
  font-weight: 600;
}

.pager__item--first a,
.pager__item--last a {
  font-weight: 600;
}

.pager__item--ellipsis {
  padding: 8px 12px;
  color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
  .global-search-wrapper {
    padding: 15px;
  }

  .search-form-container {
    padding: 20px;
  }

  .global-search-header .page-title {
    font-size: 2rem;
  }

  .search-actions {
    flex-direction: column;
  }

  .entity-type-filters {
    grid-template-columns: 1fr;
  }

  .result-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .search-result-item {
    padding: 20px 15px;
  }

  .waiting-message {
    padding: 40px 15px;
  }

  .waiting-icon i {
    font-size: 3rem;
  }

  .waiting-title {
    font-size: 1.5rem;
  }

  .waiting-text {
    font-size: 1rem;
  }

  /* Responsive pagination */
  .pager__items {
    gap: 4px;
  }

  .pager__item a,
  .pager__item span {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .pager__item--ellipsis {
    padding: 6px 8px;
  }
}
