/* AI Insights Styles for MRA POS */

/* Insight Cards */
.ai-insight-card {
    border-left: 4px solid;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: opacity 0.3s;
}
.ai-insight-card.border-danger { border-left-color: #dc3545; background: #fff5f5; }
.ai-insight-card.border-warning { border-left-color: #ffc107; background: #fffcf0; }
.ai-insight-card.border-info { border-left-color: #17a2b8; background: #f0faff; }

.ai-insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.8rem;
}
.ai-insight-title { font-size: 0.95rem; margin: 4px 0; font-weight: 600; }
.ai-insight-title-compact { font-size: 0.88rem; }
.ai-insight-desc { font-size: 0.82rem; margin-bottom: 6px; line-height: 1.4; }
.ai-insight-time { margin-left: auto; font-size: 0.75rem; }
.ai-score {
    background: #6c757d;
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}
.ai-insight-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}
.ai-feedback-btns { display: flex; gap: 4px; }
.ai-feedback-btns .btn { padding: 2px 6px; font-size: 0.72rem; }

/* Recommendations Panel */
.ai-recommendations-panel {
    background: #f8f9ff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
}
.ai-rec-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}
.ai-rec-header .close { margin-left: auto; font-size: 1.2rem; }
.ai-rec-items { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.ai-rec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 8px;
    min-width: 180px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.ai-rec-item:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.ai-rec-img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.ai-rec-info { flex: 1; min-width: 0; }
.ai-rec-name { display: block; font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-rec-price { font-size: 0.75rem; color: #6c757d; }
.ai-rec-add { padding: 2px 6px !important; flex-shrink: 0; }

/* Alert Banner */
.ai-alert-banner {
    border-radius: 4px;
    animation: aiBannerPulse 2s ease-in-out 3;
}
@keyframes aiBannerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Alert Badge */
.ai-alert-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Health Score Ring */
.ai-health-score {
    padding: 10px;
}
.health-ring-container {
    position: relative;
    display: inline-block;
}

/* Page Insights Container */
.ai-page-insights {
    margin-top: 16px;
    padding: 12px;
    background: #fafbfc;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Dashboard AI Section */
.ai-dashboard-section {
    margin-bottom: 20px;
}
.ai-dashboard-alerts {
    max-height: 300px;
    overflow-y: auto;
}
.ai-dashboard-alerts h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-rec-items { flex-direction: column; }
    .ai-rec-item { min-width: unset; }
    .ai-insight-header { flex-wrap: wrap; }
}
