/**
 * Search box styles.
 */
.custom-search__form {
    position: relative;
}

.searchform-input-wrapper {
    position: relative;
    display: inline-block;
}

.custom-search__input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.custom-search__clear {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);

	width: 48px;
	height: 48px;

	background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>') center/24px no-repeat;

	border: none;
	cursor: pointer;
	border-radius: 50%;

	/* Скрываем текст */
	font-size: 0;
	color: transparent;
}

.custom-search__clear:hover {
    color: #333;
}

.custom-search__submit {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
}

.custom-search__submit:hover {
     opacity: 0.7;
}

/**
 * Suggestions dropdown.
 */
.custom-search__suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /*max-width: 400px;*/
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    
    margin: 0 5px;
}

.custom-search__suggestions-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.custom-search__suggestion-item {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.custom-search__suggestion-item:last-child {
    border-bottom: none;
}

.custom-search__suggestion-link {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
}

.custom-search__suggestion-link:hover {
    background-color: #f8f9fa;
}

.custom-search__suggestion-active .custom-search__suggestion-link {
    background-color: #e9ecef;
}

.custom-search__suggestion-text {
    display: block;
    font-weight: 500;
}

.custom-search__suggestion-category {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.custom-search__suggestion-all {
    padding: 10px 15px;
    text-align: center;
    background-color: #f8f9fa;
}

.custom-search__suggestion-all-link {
    text-decoration: none;
    font-weight: 500;
}

.custom-search__suggestion-all-link:hover {
    text-decoration: underline;
}

.custom-search__highlight {
    background-color: #fff3cd;
    font-weight: bold;
}

/**
 * Search results page.
 */
.custom-search__title {
    margin-bottom: 30px;
    font-size: 24px;
}

.custom-search__group {
    margin-bottom: 40px;
}

.custom-search__group-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    font-size: 20px;
}

.custom-search__items {
    display: grid;
    grid-gap: 20px;
}

.custom-search__item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.custom-search__item:hover {
    background-color: #e9ecef;
}

.custom-search__item-link {
    text-decoration: none;
    color: #333;
}

.custom-search__item-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #000;
}

.custom-search__item-fields {
    font-size: 14px;
    color: #6c757d;
}

.custom-search__item-field {
    margin-top: 5px;
    line-height: 1.5;
}

.custom-search__empty-query,
.custom-search__no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

/**
 * Mobile styles.
 */
@media (max-width: 768px) {
    .custom-search__suggestions {
        position: absolute;
        top: auto;
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        
        /*margin: 0 20px;*/
    }
    
    .custom-search__form {
        width: 100%;
    }
}

/* Пагинатор */

/* Современный пагинатор */
.pager {
  margin: 3rem 0;
  text-align: center;
}

.pager__items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 0.375rem;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pager__item {
  margin: 0;
}

.pager__item a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #4a5568;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.pager__item a:hover {
  background-color: #f7fafc;
  border-color: #e2e8f0;
  border-radius: 0.25rem;
}

.pager__item.is-active a {
  color: #000;
  font-weight: 600;
  border-bottom: 2px solid #000;
}

.pager__item--next a,
.pager__item--last a,
.pager__item--previous a,
.pager__item--first a {
  color: #000;
  font-weight: 500;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}