/* Recipe Search Styles */

/* Search Suggestions Dropdown */
.search-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    margin-top: 8px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
}

.suggestion-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.suggestion-category {
    font-size: 12px;
    color: #888;
}

/* Search Results Modal */
.search-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    overflow-y: auto;
}

.search-results-modal.show {
    display: block;
}

.search-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: relative;
    max-width: 1100px;
    margin: 40px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 20px 20px 0 0;
}

.search-modal-header h4 {
    font-weight: 600;
    font-size: 18px;
}

.search-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #e9ecef;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #666;
}

.search-modal-close:hover {
    background: #dc3545;
    color: white;
    transform: rotate(90deg);
}

.search-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Search Result Cards */
.search-result-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.search-result-card .thumb img {
    transition: transform 0.3s ease;
}

.search-result-card:hover .thumb img {
    transform: scale(1.05);
}

/* Loading State */
.search-loading {
    padding: 60px 20px;
}

.search-loading .spinner-border {
    width: 50px;
    height: 50px;
}

/* No Results */
.no-results {
    padding: 60px 20px;
}

.no-results i {
    color: #dee2e6;
}

.no-results h4 {
    color: #333;
    font-weight: 600;
}

.no-results .suggestions ul {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.no-results .suggestions li {
    padding: 5px 0;
}

/* Search Error */
.search-error {
    padding: 60px 20px;
}

/* Notification */
.search-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    background: #333;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    display: none;
    animation: notificationSlide 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.search-notification.warning {
    background: #ffc107;
    color: #333;
}

.search-notification.error {
    background: #dc3545;
}

.search-notification.success {
    background: #28a745;
}

@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .search-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .search-modal-header {
        padding: 15px 20px;
    }

    .search-modal-body {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .search-modal-content {
        margin: 10px;
        border-radius: 15px;
    }

    .search-modal-header {
        border-radius: 15px 15px 0 0;
    }

    .search-modal-header h4 {
        font-size: 15px;
    }

    .search-result-card .thumb img {
        height: 150px !important;
    }

    .search-suggestions-dropdown {
        border-radius: 8px;
    }

    .suggestion-item {
        padding: 10px 12px;
    }

    .suggestion-img {
        width: 40px;
        height: 40px;
    }
}

/* Search Form Enhancement */
.search-adjust1 {
    position: relative;
}

.search-adjust1 input:focus {
    outline: none;
    box-shadow: none;
}

.search-adjust1 form {
    flex: 1;
}
