/* 
 * PUBLIC RECIPE SEARCH - Styles for public recipe search page
 * Apetyty.art - 2025
 */

/* Search Header */
.search-header {
    margin-bottom: 2rem;
    text-align: center;
}

.search-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #967259;
    margin-bottom: 0.5rem;
}

.search-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Search Form */
.search-form-container {
    background-color: #f9f5f2;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(150, 114, 89, 0.2);
    box-shadow: 0 2px 10px rgba(150, 114, 89, 0.08);
}

.search-input-group {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #967259;
    font-size: 1.2rem;
}

.search-input {
    padding-left: 45px;
    height: 50px;
    border-radius: 25px;
    border: 2px solid rgba(150, 114, 89, 0.3);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #967259;
    box-shadow: 0 0 0 0.25rem rgba(150, 114, 89, 0.25);
}

/* Filter Section */
.filter-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid rgba(150, 114, 89, 0.2);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.filter-title {
    font-size: 1.2rem;
    color: #967259;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Tag and Ingredient Filters */
.tag-filter-container,
.ingredient-filter-container {
    position: relative;
}

.tag-search-input,
.ingredient-search-input {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f5f0eb;
}

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

/* Selected Tags and Ingredients */
.selected-tags-container,
.excluded-tags-container,
.selected-ingredients-container,
.excluded-ingredients-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.selected-tag,
.excluded-tag,
.selected-ingredient,
.excluded-ingredient {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.selected-tag,
.selected-ingredient {
    background-color: #e6f0eb;
    color: #305A48;
    border: 1px solid #305A48;
}

.excluded-tag,
.excluded-ingredient {
    background-color: #f9e6e6;
    color: #c53030;
    border: 1px solid #c53030;
}

.selected-tag:hover,
.excluded-tag:hover,
.selected-ingredient:hover,
.excluded-ingredient:hover {
    transform: translateY(-2px);
}

.tag-remove-btn,
.ingredient-remove-btn {
    margin-left: 8px;
    font-size: 0.8rem;
}

/* Popular Tags */
.popular-tags {
    margin-top: 1rem;
}

.popular-tags h6 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.popular-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f0e6e0;
    color: #967259;
    border: 1px solid #967259;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.popular-tag:hover {
    background-color: #967259;
    color: #fff;
    transform: translateY(-2px);
}

/* Search Results */
.search-results-container {
    margin-top: 2rem;
}

.results-title {
    font-family: 'Playfair Display', serif;
    color: #967259;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.featured-recipes-title {
    font-family: 'Playfair Display', serif;
    color: #967259;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.recipe-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-card .card {
    border: 1px solid #e5d5c2;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(150, 114, 89, 0.06);
    transition: box-shadow 0.3s, border-color 0.3s;
    background: #fff;
    overflow: hidden;
}

.recipe-card:hover .card {
    border-color: #967259;
    box-shadow: 0 5px 15px rgba(150, 114, 89, 0.15);
}

.recipe-img-container {
    height: 180px;
    overflow: hidden;
}

.recipe-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recipe-card:hover .recipe-img {
    transform: scale(1.05);
}

.recipe-card .card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #967259;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3rem;
}

.recipe-card .card-text {
    font-size: 0.9rem;
    color: #777;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #967259;
    background-color: #fff;
    border: 1px solid #967259;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: #f0e6e0;
    color: #967259;
}

.page-item.active .page-link {
    background-color: #967259;
    color: #fff;
    border-color: #967259;
}

.page-item.disabled .page-link {
    color: #ccc;
    border-color: #eee;
    pointer-events: none;
}

/* No Results */
.no-results {
    padding: 3rem 0;
    text-align: center;
    color: #666;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .search-form-container {
        padding: 1.5rem;
    }
    
    .filter-section {
        margin-bottom: 1.5rem;
    }
    
    .search-title {
        font-size: 2rem;
    }
    
    .recipe-img-container {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .recipe-img-container {
        height: 200px;
    }
}
