/* CIPS5 Progress Suite - Frontend Styles */

/* Common Styles */
.cips5-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Flowchart Styles */
.cips5-flowchart-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.flowchart-svg {
    width: 100%;
    height: auto;
    min-height: 500px;
}

.node-ellipse {
    fill: white;
    stroke: #333;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.difficulty-high .node-ellipse {
    fill: #ffebee;
    stroke: #ef5350;
    stroke-width: 3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { stroke-width: 3; }
    50% { stroke-width: 5; }
}

/* Timeline Styles */
.cips5-timeline-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
}

.sparkline-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.sparkline-card {
    background: #fafbfc;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    transition: all 0.3s;
}

.sparkline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sparkline-canvas {
    width: 100%;
    height: 60px;
}

.change-indicator.improved {
    color: #4caf50;
}

.change-indicator.worsened {
    color: #ff9800;
}

/* Intervention Logger Styles */
.cips5-five-ingredients-logger {
    max-width: 1000px;
    margin: 0 auto;
}

.ingredient-section {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.ingredient-section:hover {
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ingredient-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.ingredient-icon {
    font-size: 32px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.5s ease;
}

/* Planner Styles */
.cips5-intervention-planner {
    max-width: 900px;
    margin: 0 auto;
}

.planner-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.planning-step {
    background: white;
    padding: 30px;
    border: 2px solid #e0e0e0;
    border-top: none;
    min-height: 300px;
}

.difficulty-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.difficulty-item.high-difficulty {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

.week-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.plan-progress {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8f9fa;
}

.progress-stat {
    text-align: center;
}

.progress-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

/* Buttons */
.cips5-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.cips5-btn-primary {
    background: #2196F3;
    color: white;
}

.cips5-btn-primary:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.cips5-btn-success {
    background: #4CAF50;
    color: white;
}

.cips5-btn-success:hover {
    background: #45a049;
}

/* Modal Styles */
.cips5-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cips5-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .sparkline-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-progress {
        flex-direction: column;
        gap: 20px;
    }
    
    .ingredient-header {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .cips5-btn,
    .planner-navigation {
        display: none;
    }
    
    .cips5-container {
        max-width: 100%;
    }
}
