/* Minimalist & Understated CSS for the WebMCP Search Page */

:root {
    --border-color: #e0e0e0;
    --text-muted: #555;
    --text-dark: #333;
    --highlight-bg: #fff9c4; /* Soft warm yellow highlight for matches */
    --highlight-text: #333;
}

/* Base search layout */
.search-container {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

/* Search input container */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    background-color: #ffffff;
}

.search-input-wrapper:focus-within {
    border-color: #333333;
}

.search-icon {
    font-size: 1.1rem;
    margin-right: 0.6rem;
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--text-dark);
    padding: 0.4rem 0;
    background: transparent;
}

#search-input::-webkit-search-cancel-button {
    display: none; /* Hide default cancel button */
}

/* Clear button */
.clear-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.clear-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.clear-btn:hover {
    color: var(--text-dark);
}

/* Stats */
.search-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-left: 0.2rem;
}

.search-stats.hidden {
    display: none;
}

/* Results container */
.search-results-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
}

/* Empty & Suggestion state */
.search-empty-state,
.search-no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    background-color: #f9f9f9;
}

.search-no-results h3 {
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.suggested-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.suggested-tags span {
    font-size: 0.85rem;
}

.tag-btn {
    background-color: #f5f5f5;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tag-btn:hover {
    background-color: #e0e0e0;
    border-color: #999999;
}

/* Search results (Flat list items separated by lines) */
.search-result-item {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

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

.search-result-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.search-result-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
    flex-grow: 1;
}

.search-result-title a {
    color: #0055bb; /* Understated link blue */
}

.search-result-title a:hover {
    color: #333333;
    text-decoration: underline;
}

.search-result-url {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.search-result-url a {
    color: var(--text-muted);
    font-weight: normal;
}

.search-result-url a:hover {
    text-decoration: underline;
    color: #333333;
}

.search-result-snippet {
    font-size: 0.95rem;
    color: #333333;
    line-height: 1.6;
    margin: 0;
}

/* Match highlighting */
.search-highlight {
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    padding: 0.05rem 0.2rem;
}

/* Badges */
.score-badge {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--text-muted);
}

.lang-badge {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.1rem 0.3rem;
    border: 1px solid var(--border-color);
    color: #555555;
    background-color: #f5f5f5;
}

.lang-de,
.lang-en {
    background-color: #f5f5f5;
    color: #555555;
}

/* Details Panel (Developer Info) */
.webmcp-info-panel {
    margin-top: 3rem;
    border: 1px solid var(--border-color);
    background-color: #f9f9f9;
}

.webmcp-summary {
    font-weight: bold;
    padding: 0.8rem 1rem;
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

.webmcp-summary:hover {
    background-color: #eeeeee;
}

.webmcp-badge {
    background-color: #333333;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.35rem;
    margin-right: 0.5rem;
}

.webmcp-content {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #333333;
    background-color: #ffffff;
}

.webmcp-content h4 {
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    font-size: 1rem;
}

.webmcp-content p {
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.webmcp-content pre {
    background-color: #f5f5f5;
    color: #333333;
    padding: 0.6rem;
    font-size: 0.8rem;
    overflow-x: auto;
    margin-bottom: 0.8rem;
    border: 1px solid var(--border-color);
}
