/* Pie Chart Creator - Additional Styles to Extend bar-chart-generator.css */

/* Slice explosion controls */
.slice-explosion-controls {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.5rem;
    background: #1a1a1a;
}

.slice-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 4px;
    background: #2c2c2c;
    transition: background 0.3s ease;
    margin-bottom: 0.3rem;
}

.slice-control:hover {
    background: #34495e;
}

.slice-control input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    transform: scale(1.2);
}

.slice-control .slice-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #666;
    flex-shrink: 0;
}

.slice-control label {
    flex: 1;
    cursor: pointer;
    font-size: 0.85rem;
    color: #ccc;
}

/* Success animations for slice explosion changes */
.slice-explosion-success {
    animation: sliceUpdate 0.6s ease-in-out;
}

@keyframes sliceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background-color: #27ae60; }
    100% { transform: scale(1); }
}

/* Data table specific styles for pie charts */
.data-table input[type="color"] {
    width: 40px;
    height: 30px;
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #444;
}

.delete-data-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.delete-data-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Color preview segments */
.color-preview-segment {
    height: 20px;
    flex: 1;
    margin: 0 1px;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-preview-segment:hover {
    transform: scaleY(1.2);
}

/* Notification styles */
.pie-notification {
    position: fixed;
    top: 120px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.notification-success {
    background: #27ae60;
    color: white;
}

.notification-error {
    background: #e74c3c;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced analysis section styling */
.analysis-insight {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.analysis-insight h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-insight ul {
    margin: 0.5rem 0 0 1rem;
}

.analysis-insight li {
    margin-bottom: 0.3rem;
    color: #2c3e50;
}

/* Mobile responsiveness for pie chart specific elements */
@media (max-width: 768px) {
    .slice-explosion-controls {
        max-height: 150px;
    }
    
    .slice-control {
        font-size: 0.8rem;
        padding: 0.3rem;
    }
    
    .slice-control .slice-color {
        width: 14px;
        height: 14px;
    }
    
    .data-table input[type="color"] {
        width: 35px;
        height: 25px;
    }
    
    .pie-notification {
        right: 10px;
        max-width: calc(100vw - 20px);
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .slice-control {
        font-size: 0.75rem;
        padding: 0.2rem;
    }
    
    .slice-control .slice-color {
        width: 12px;
        height: 12px;
    }
    
    .delete-data-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .analysis-insight {
        padding: 0.8rem;
        margin: 0.5rem 0;
    }
    
    .analysis-insight h4 {
        font-size: 0.9rem;
    }
}
