/* ===== SUNBURST CHART STYLES ===== */
.sunburst-chart {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sunburst-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ===== SUNBURST SEGMENTS ===== */
.sunburst-segment {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sunburst-segment:hover {
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.15));
    transform: scale(1.02);
}

.sunburst-segment:active {
    transform: scale(0.98);
}

/* ===== SEGMENT LEVELS ===== */
.segment-level-1 {
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 2;
}

.segment-level-2 {
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 1.5;
}

/* ===== SEGMENT LABELS ===== */
.segment-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    font-weight: 600;
    fill: #ffffff;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.segment-label-level-1 {
    font-size: 14px;
    font-weight: 700;
}

.segment-label-level-2 {
    font-size: 11px;
    font-weight: 500;
}

/* ===== HOVER EFFECTS ===== */
.sunburst-segment:hover + .segment-label,
.segment-label.hovered {
    fill: #60a5fa;
    font-size: 13px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.segment-label-level-1:hover,
.segment-label-level-1.hovered {
    font-size: 16px;
}

.segment-label-level-2:hover,
.segment-label-level-2.hovered {
    font-size: 12px;
}

/* ===== CENTER LOGO AREA ===== */
.sunburst-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
    border: 2px solid rgba(14, 165, 233, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.2);
}

/* ===== TOOLTIP STYLES ===== */
.sunburst-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    max-width: 200px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sunburst-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.sunburst-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
}

/* ===== ANIMATION STATES ===== */
.sunburst-segment.animating {
    animation: segmentSlideIn 0.8s ease-out forwards;
}

.segment-label.animating {
    animation: labelFadeIn 1s ease-out forwards;
}

@keyframes labelFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .segment-label {
        font-size: 10px;
    }
    
    .segment-label-level-1 {
        font-size: 12px;
    }
    
    .segment-label-level-2 {
        font-size: 9px;
    }
    
    .sunburst-center {
        width: 100px;
        height: 100px;
    }
    
    .sunburst-tooltip {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .segment-label {
        font-size: 9px;
    }
    
    .segment-label-level-1 {
        font-size: 11px;
    }
    
    .segment-label-level-2 {
        font-size: 8px;
    }
    
    .sunburst-center {
        width: 80px;
        height: 80px;
    }
    
    .sunburst-tooltip {
        font-size: 10px;
        padding: 5px 8px;
        max-width: 120px;
    }
}

/* ===== ACCESSIBILITY ===== */
.sunburst-segment:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.sunburst-segment[aria-selected="true"] {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.8));
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .segment-label {
        text-shadow: 0 0 3px rgba(0, 0, 0, 1);
    }
    
    .sunburst-segment {
        stroke-width: 3px;
    }
    
    .sunburst-tooltip {
        border-width: 2px;
        background: rgba(0, 0, 0, 0.95);
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.sunburst-segment {
    will-change: transform, filter;
}

.segment-label {
    will-change: transform, font-size;
}

.sunburst-tooltip {
    will-change: opacity, transform;
}
