/* Import the custom font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

/* Apply Playfair Display font to all elements within the plugin */
.bb-ai-search-container, .bb-ai-search-container *, #bb-ai-results, #bb-ai-results * {
    font-family: 'Playfair Display', serif;
}

/* --- Search Bar Container --- */
.bb-ai-search-container {
    max-width: 960px;
    margin: 0 auto 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.bb-ai-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;
    padding: 5px;
    border-radius: 60px;
    background: linear-gradient(to right, #6a82fb, #fc5c7d);
    flex-wrap: wrap;
}

#bb-ai-generator-form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 60px;
    background: #fff;
    padding: 0 10px;
    box-sizing: border-box;
}

/* === Search Icon Styling === */
.bb-ai-search-icon {
    font-size: 20px;
    color: #a0a0a0;
    margin-right: 10px;
    line-height: 1;
}

.bb-ai-search-icon::before {
    content: "\1F50D";
}

/* === Search Bar Styling === */
#bb-ai-generator-form input[type="text"] {
    flex-grow: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #333;
}

#bb-ai-generator-form input[type="text"]::placeholder {
    color: #a0a0a0;
}

/* === Generate Button Styling === */
#bb-ai-generator-form button {
    height: 50px;
    padding: 0 30px;
    background: linear-gradient(to right, #fc5c7d, #ff8c00);
    color: white;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

#bb-ai-generator-form button:hover {
    background: linear-gradient(to right, #ff8c00, #fc5c7d);
}

/* --- Output Layout --- */
#bb-ai-results {
    width: 100%;
    padding: 50px 20px;
    box-sizing: border-box;
    margin: 0;
    max-width: 100%;
}

/* === Title Styling === */
.results-title {
    color: #E0720A;
    font-family: 'Playfair Display', serif;
    font-size: 28px; /* Increased from 22px */
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Product Suggestion Styling */
.product-suggestion {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.product-suggestion h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.product-suggestion img {
    max-width: 150px;
    height: auto;
    border-radius: 5px;
}

/* Grid Container */
.suggestions-grid-container {
    padding: 10px;
}

/* === Responsive Grid Layout === */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 1024px) {
    .suggestions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* === Suggestion Item Styling === */
.suggestion-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    color: #201E22;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.suggestion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* === Load More Button Styling === */
#load-more-btn {
    display: block;
    width: fit-content;
    margin: 30px auto 0;
    padding: 12px 24px;
    background: linear-gradient(to right, #fc5c7d, #ff8c00);
    color: white;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

#load-more-btn:hover {
    background: linear-gradient(to right, #ff8c00, #fc5c7d);
}

/* === Error Message Styling === */
.error-message {
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

/* === Responsive Enhancements === */
@media (max-width: 600px) {
    .bb-ai-form-wrapper {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    #bb-ai-generator-form {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    #bb-ai-generator-form input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
        font-size: 16px;
    }

    #bb-ai-generator-form button {
        width: 100%;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .suggestion-item {
        height: auto;
        padding: 12px;
        font-size: 15px;
    }
}
