/* static/css/ml_styles.css */
/* ML UI Styles for Nesting Software */
/* Copyright (c) 2025 Philip Andrew John Hubbard */

/* ML Recommendation Display */
.ml-recommendation {
    margin: 15px 0;
    padding: 15px;
    padding-right: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    position: relative;
}

.ml-recommendation h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.ml-rec-content p {
    margin: 8px 0;
}

.ml-reasoning {
    font-style: italic;
    opacity: 0.9;
    font-size: 0.9em;
}

.ml-note {
    font-size: 0.85em;
    opacity: 0.8;
    margin-top: 10px;
}

/* Confidence Badge */
.confidence-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
}

.confidence-badge.high {
    background: #28a745;
    color: white;
}

.confidence-badge.medium {
    background: #ffc107;
    color: #333;
}

.confidence-badge.low {
    background: #dc3545;
    color: white;
}

/* ML Buttons */
.ml-recommend-btn,
.ml-insights-btn {
    width: 100%;
    margin-top: 10px;
}

/* Insights Modal */
.insights-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.insights-modal .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Insights Display */
.insights-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.insights-summary p {
    margin: 5px 0;
}

.insights-performance {
    margin-top: 15px;
}

.algo-stat {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid #667eea;
}

.algo-stat strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.stat-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9em;
    color: #666;
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}
