/**
 * Semantic Search Styles für Aldersbach Website
 * Matching existing theme colors: #8B0000 (dark red), tan
 */

/* Search Type Selector */
.search-type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.search-type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-type-option:hover {
    border-color: #8B0000;
    box-shadow: 0 2px 6px rgba(139, 0, 0, 0.1);
}

.search-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.search-type-option input[type="radio"]:checked + .search-type-label {
    color: #8B0000;
    font-weight: bold;
}

.search-type-option input[type="radio"]:checked ~ .search-type-description {
    color: #8B0000;
}

.search-type-option:has(input[type="radio"]:checked) {
    border-color: #8B0000;
    background: #fff9f9;
}

.search-type-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
    transition: color 0.2s ease;
}

.search-type-description {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    transition: color 0.2s ease;
}

/* Container for semantic search results */
#semantic-results {
    margin-top: 2rem;
    padding: 0;
}

/* Section wrapper (if used with heading) */
.semantic-search-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.semantic-search-section h3 {
    color: #8B0000;
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Individual result card */
.semantic-result {
    background: white;
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-left: 4px solid tan;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.semantic-result:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.semantic-result:last-child {
    margin-bottom: 0;
}

/* Result header with title and score */
.semantic-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.semantic-result-title {
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.semantic-result-title a {
    color: #8B0000;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.semantic-result-title a:hover {
    text-decoration: underline;
}

/* Similarity score badge */
.semantic-result-score {
    background: #8B0000;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Content snippet */
.semantic-result-snippet {
    color: #555;
    line-height: 1.6;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* Category badge */
.semantic-result-category {
    display: inline-block;
    background: tan;
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    margin-top: 0.5rem;
}

/* Loading state */
.semantic-loading {
    color: #666;
    font-style: italic;
    padding: 1rem;
    text-align: center;
    background: #f9f9f9;
    border-radius: 4px;
}

/* No results state */
.semantic-no-results {
    color: #999;
    padding: 1rem;
    text-align: center;
    background: #f9f9f9;
    border-radius: 4px;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .search-type-selector {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .search-type-option {
        padding: 0.8rem;
    }

    .search-type-label {
        font-size: 1rem;
    }

    .search-type-description {
        font-size: 0.8rem;
    }

    .semantic-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .semantic-result-score {
        align-self: flex-start;
    }

    .semantic-result {
        padding: 1rem;
    }

    .semantic-result-title a {
        font-size: 1rem;
    }

    .semantic-result-snippet {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #semantic-results,
    .semantic-search-section {
        margin-top: 1rem;
        padding: 0.8rem;
    }

    .semantic-result {
        padding: 0.8rem;
    }

    .semantic-result-title a {
        font-size: 0.95rem;
    }

    .semantic-result-snippet {
        font-size: 0.85rem;
    }

    .semantic-result-score {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}
