/* 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;
    }
}

   /* Tutorial Modal Styles */
        .tutorial-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.75);
            z-index: 9999;
            overflow-y: auto;
            animation: fadeIn 0.3s ease;
        }

        .tutorial-overlay.active {
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 20px;
        }

        .tutorial-modal {
            background: #6f7b77;
            border-radius: 12px;
            max-width: 60%;
            width: 60%;
            margin: 40px auto;
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
            position: relative;
            animation: slideIn 0.4s ease;
        }

        .tutorial-header {
            background: linear-gradient(135deg, #3498db, #2ecc71);
            color: white;
            padding: 30px;
            border-radius: 12px 12px 0 0;
            position: relative;
        }

        .tutorial-header h1 {
            margin: 0 0 10px 0;
            font-size: 2.2rem;
            font-weight: 700;
        }

        .tutorial-header p {
            margin: 0;
            font-size: 1.1rem;
            opacity: 0.95;
        }

        .close-tutorial {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid white;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            font-weight: bold;
        }

        .close-tutorial:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .tutorial-content {
            padding: 40px;
            color: #2c3e50;
            line-height: 1.8;
        }

        .tutorial-content h2 {
            color: #3498db;
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 1.6rem;
            border-bottom: 3px solid #3498db;
            padding-bottom: 10px;
        }

        .tutorial-content h3 {
            color: #2c3e50;
            margin-top: 25px;
            margin-bottom: 12px;
            font-size: 1.3rem;
        }

        .tutorial-content p {
            margin-bottom: 15px;
            font-size: 1.05rem;
        }

        .tutorial-content ul, .tutorial-content ol {
            margin: 15px 0;
            padding-left: 30px;
        }

        .tutorial-content li {
            margin-bottom: 12px;
            font-size: 1.05rem;
        }

        .feature-box {
            background: #2c2d2e;
            border-left: 4px solid #3498db;
            padding: 20px;
            margin: 20px 0;
            border-radius: 0 8px 8px 0;
        }

        .tip-box {
            background: #404343;
            border-left: 4px solid #2ecc71;
            padding: 20px;
            margin: 20px 0;
            border-radius: 0 8px 8px 0;
        }

        .warning-box {
            background: #e29696;
            border-left: 4px solid #f39c12;
            padding: 20px;
            margin: 20px 0;
            border-radius: 0 8px 8px 0;
        }

        .tutorial-button {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: linear-gradient(135deg, #3498db, #2ecc71);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 50px;
            cursor: pointer;
            font-size: 1.1rem;
            font-weight: 600;
            box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
            transition: all 0.3s ease;
            z-index: 1000;
        }

        .tutorial-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 30px rgba(52, 152, 219, 0.6);
        }

        .step-number {
            display: inline-block;
            background: #3498db;
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            text-align: center;
            line-height: 30px;
            font-weight: bold;
            margin-right: 10px;
        }

        code {
            background: #f4f4f4;
            padding: 3px 8px;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            color: #e74c3c;
            font-size: 0.95rem;
        }

        strong {
            color: #2c3e50;
            font-weight: 600;
        }

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

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

        @media (max-width: 768px) {
            .tutorial-modal {
                margin: 20px;
            }

            .tutorial-header h1 {
                font-size: 1.6rem;
            }

            .tutorial-content {
                padding: 25px;
            }

            .tutorial-button {
                bottom: 20px;
                right: 20px;
                padding: 12px 20px;
                font-size: 1rem;
            }
        }