/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.kpp-container {
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    text-align: center;
}

.kpp-question-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.kpp-question-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.kpp-answers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.kpp-answer-item {
    flex: 1 0 200px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.kpp-answer-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.kpp-answer-item.selected {
    background: #e7f5fa;
    border-color: #0073aa;
}

.kpp-products-container {
    margin-top: 30px;
    text-align: center;
}

.kpp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.kpp-product-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    transition: all 0.2s ease;
}

.kpp-product-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.kpp-product-image {
    text-align: center;
    margin-bottom: 15px;
}

.kpp-product-image img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
}

.kpp-product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.kpp-product-title-link {
    text-decoration: none;
    color: inherit;
}

.kpp-product-title-link:hover .kpp-product-title {
    color: #0073aa;
}

.kpp-product-image-link {
    display: block;
    text-decoration: none;
}

.kpp-product-sku {
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
}

.kpp-product-link {
    display: inline-block;
    padding: 8px 15px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.kpp-product-link:hover {
    background: #005f8b;
    color: #fff;
}

.kpp-loading {
    text-align: center;
    padding: 20px;
}

.kpp-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: kpp-spin 1s ease-in-out infinite;
}

@keyframes kpp-spin {
    to {
        transform: rotate(360deg);
    }
}

.kpp-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 3px;
    margin-bottom: 20px;
}

.kpp-no-products {
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 5px;
    margin-top: 20px;
}

.kpp-selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.kpp-reset-button {
    display: inline-block;
    padding: 8px 15px;
    background: #f44336;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background 0.2s ease;
    cursor: pointer;
    margin-bottom: 20px;
    border: none;
}

.kpp-reset-button:hover {
    background: #d32f2f;
}

.kpp-filter-tag {
    display: inline-block;
    padding: 5px 10px;
    background: #e7f5fa;
    border-radius: 3px;
    font-size: 14px;
}

.kpp-filter-tag .kpp-remove-tag {
    margin-left: 5px;
    cursor: pointer;
    color: #0073aa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kpp-answers-list {
        flex-direction: column;
    }

    .kpp-answer-item {
        flex: 1 0 auto;
    }

    .kpp-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
