.bb-ai-rec-widget,
.bb-ai-rec-profile-widget,
.bb-ai-rec-activity-widget,
.bb-ai-rec-course-widget,
.bb-ai-rec-shortcode-widget {
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.bb-ai-rec-widget h3,
.bb-ai-rec-profile-widget h3,
.bb-ai-rec-activity-widget h3,
.bb-ai-rec-course-widget h3,
.bb-ai-rec-shortcode-widget h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.bb-ai-rec-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.bb-ai-rec-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: bb-ai-rec-spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes bb-ai-rec-spin {
    to { transform: rotate(360deg); }
}

.bb-ai-rec-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bb-ai-rec-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.3s ease;
}

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

.rec-item-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.rec-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.rec-item-image .avatar {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50%;
}

.rec-item-content {
    flex-grow: 1;
    min-width: 0;
}

.rec-item-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.rec-item-content h4 a {
    color: #333;
    text-decoration: none;
}

.rec-item-content h4 a:hover {
    color: #0073aa;
}

.rec-item-meta {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.rec-item-price {
    margin: 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0073aa;
}

.bb-ai-rec-no-data {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* BuddyBoss specific styles */
.bb-ai-rec-item .generic-button {
    margin-top: 10px;
}

.bb-ai-rec-item .friendship-button,
.bb-ai-rec-item .group-button {
    display: inline-block;
    margin-top: 10px;
}

/* Responsive styles */
@media (max-width: 600px) {
    .bb-ai-rec-item {
        flex-direction: column;
        text-align: center;
    }
    
    .rec-item-image {
        margin: 0 auto;
    }
}

/* Widget specific styles */
.widget .bb-ai-rec-widget h3 {
    font-size: 16px;
}

.widget .bb-ai-rec-item {
    padding: 10px;
}

.widget .rec-item-image {
    width: 40px;
    height: 40px;
}

.widget .rec-item-content h4 {
    font-size: 14px;
}

/* Activity stream integration */
.bp-feedback.bb-ai-rec-activity-widget {
    background: transparent;
    border: none;
    padding: 0;
}

.activity-list .bb-ai-rec-activity-widget {
    margin: 0 0 20px 0;
}

/* Profile page integration */
.bp-member .bb-ai-rec-profile-widget {
    margin-top: 30px;
}

/* Course page integration */
.learndash-wrapper .bb-ai-rec-course-widget {
    margin-top: 30px;
}

/* Grid layout */
.bb-ai-rec-grid .bb-ai-rec-items {
    display: grid;
    gap: 20px;
}

.bb-ai-rec-grid.bb-ai-rec-cols-2 .bb-ai-rec-items {
    grid-template-columns: repeat(2, 1fr);
}

.bb-ai-rec-grid.bb-ai-rec-cols-3 .bb-ai-rec-items {
    grid-template-columns: repeat(3, 1fr);
}

.bb-ai-rec-grid.bb-ai-rec-cols-4 .bb-ai-rec-items {
    grid-template-columns: repeat(4, 1fr);
}

.bb-ai-rec-grid .bb-ai-rec-item {
    flex-direction: column;
    text-align: center;
}

.bb-ai-rec-grid .rec-item-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
}

.bb-ai-rec-grid .rec-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel layout */
.bb-ai-rec-carousel .bb-ai-rec-items {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 10px;
}

.bb-ai-rec-carousel .bb-ai-rec-item {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.bb-ai-rec-carousel .bb-ai-rec-items::-webkit-scrollbar {
    height: 8px;
}

.bb-ai-rec-carousel .bb-ai-rec-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.bb-ai-rec-carousel .bb-ai-rec-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.bb-ai-rec-carousel .bb-ai-rec-items::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Logged out message */
.bb-ai-rec-logged-out-message {
    text-align: center;
    padding: 20px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    color: #666;
}

/* Responsive grid */
@media (max-width: 768px) {
    .bb-ai-rec-grid.bb-ai-rec-cols-3 .bb-ai-rec-items,
    .bb-ai-rec-grid.bb-ai-rec-cols-4 .bb-ai-rec-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bb-ai-rec-grid .bb-ai-rec-items {
        grid-template-columns: 1fr !important;
    }
}