/**
 * mSearch Frontend Styles
 */

/* Form */
.mse-form {
    display: flex;
    gap: 0.5rem;
}

.mse-input {
    flex: 1;
    padding: 1rem 1rem;
    font-size: 1.7rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.mse-input:focus {
    border-color: #007bff;
}

.mse-button {
	min-width: 150px;	
	padding: 0.75rem 1.5rem;
    font-size: 1.8rem;
    font-weight: 500;
    color: #000000;
    background-color: transparent;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mse-button:hover {
   background-color: #333333;
    color: #fff;

}

/* Autocomplete */
.mse-form[data-autocomplete="true"] {
    position: relative;
}

.mse-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.mse-autocomplete.active {
    display: block;
}

.mse-autocomplete-item {
    padding: 0;
    cursor: pointer;
}

.mse-autocomplete-item:hover,
.mse-autocomplete-item.active {
    background-color: #f5f5f5;
}

/* Suggestion item — common */
.mse-suggest-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: inherit;
    text-decoration: none;
}

.mse-suggest-item:hover {
    color: inherit;
    text-decoration: none;
}

/* Resource — single-line title with optional intro */
.mse-suggest-item--resource {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.mse-suggest-item--resource .mse-suggest-title {
    font-weight: 500;
	color: #2e2e2e;
}

.mse-suggest-item--resource .mse-suggest-intro {
    display: block;
    font-size: 12px;
    color: rgb(102 102 102 / 76%);;
}

/* Product — image + body column */
.mse-suggest-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.mse-suggest-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.mse-suggest-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mse-suggest-article {
    font-size: 0.8rem;
    color: #888;
}

.mse-suggest-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.mse-suggest-price-current {
    font-weight: 600;
}

.mse-suggest-price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 0.85rem;
}

/* Results */
.mse-results {
    margin-top: 1.5rem;
}

.mse-results-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.mse-results-info {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.mse-results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mse-result {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.mse-result-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.mse-result-title a {
    color: #007bff;
    text-decoration: none;
}

.mse-result-title a:hover {
    text-decoration: underline;
}

.mse-result-intro {
    margin: 0 0 0.5rem 0;
    color: #333;
    line-height: 1.5;
}

.mse-result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
}

/* Highlight */
.mse-highlight {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

/* No results */
.mse-no-results {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.mse-suggest-intro {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
}


.search-tv-line {
    margin-top: 5px;
    line-height: 1.6;
}

.search-tv-separator {
    color: #999;
    margin: 0 5px;
}
/* Результаты поиска */
.articles-stacked .mse2-row {
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
    line-height: 1.6;
}

.articles-stacked .search-number {
    margin-right: 5px;
    color: #888;
	font-size: 19px;
}

.articles-stacked .search-link {
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Roboto Condensed', sans-serif;
}

.articles-stacked .search-link:hover {
    text-decoration: underline;
}

.articles-stacked .search-intro {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.articles-stacked .mse-highlight {
    padding: 0 2px;
    background: #fff1a8;
    color: #222;
    font-weight: 600;
}
/* Подсказки нового mSearch */
.mse-autocomplete {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
}

.mse-autocomplete-item {
    border-bottom: 1px solid #eee;
}

.mse-suggest-item {
    padding: 9px 12px;
    color: #333;
    text-decoration: none;
}

.mse-suggest-item:hover,
.mse-autocomplete-item.active .mse-suggest-item {
    background: #f5f5f5;
}

.mse-suggest-title {
    display: block;
    font-size: 16px;
    line-height: 1.4;
    white-space: normal;
}
button.mse-button svg {
    position: relative;
    left: -10px;
}