/* Organization Chart Specific Styles */

.org-chart-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.org-chart-toolbar {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.org-chart-filters {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.org-chart-canvas {
    position: relative;
    overflow: auto;
    background: 
        radial-gradient(circle at 20px 20px, #e9ecef 1px, transparent 1px),
        radial-gradient(circle at 80px 80px, #e9ecef 1px, transparent 1px);
    background-size: 100px 100px;
    background-position: 0 0, 40px 40px;
}

/* Syncfusion Diagram Customizations */
.e-diagram {
    background: transparent !important;
}

.e-diagram-node {
    cursor: pointer;
}

.e-diagram-node:hover {
    filter: brightness(1.05);
}

/* Custom Node Styles */
.persona-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 160px;
    max-width: 200px;
}

.persona-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.persona-card.selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.persona-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 8px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6c757d;
}

.persona-avatar.has-image {
    background-size: cover;
    background-position: center;
}

.persona-name {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin-bottom: 4px;
    line-height: 1.2;
}

.persona-title {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 6px;
    line-height: 1.2;
}

.persona-department {
    font-size: 11px;
    color: #495057;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 12px;
    display: inline-block;
}

.authority-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    border: 2px solid white;
}

.authority-executive { background: #dc3545; }
.authority-senior-manager { background: #fd7e14; }
.authority-manager { background: #ffc107; color: #212529; }
.authority-team-lead { background: #20c997; }
.authority-senior { background: #6f42c1; }
.authority-standard { background: #6c757d; }

/* Connection Lines */
.org-connector {
    stroke: #6c757d;
    stroke-width: 2;
    fill: none;
}

.org-connector:hover {
    stroke: #0d6efd;
    stroke-width: 3;
}

.org-connector-arrow {
    fill: #6c757d;
}

.org-connector-arrow:hover {
    fill: #0d6efd;
}

/* Department Grouping */
.department-group {
    background: rgba(13, 110, 253, 0.05);
    border: 2px dashed rgba(13, 110, 253, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 10px;
}

.department-label {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #0d6efd;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoom-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Minimap */
.minimap {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 200px;
    height: 150px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.minimap-viewport {
    position: absolute;
    border: 2px solid #0d6efd;
    background: rgba(13, 110, 253, 0.1);
    cursor: move;
}

/* Search Highlight */
.search-highlight {
    background: rgba(255, 193, 7, 0.3) !important;
    border-color: #ffc107 !important;
}

.search-highlight .persona-name {
    background: rgba(255, 193, 7, 0.5);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Loading States */
.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #6c757d;
}

.chart-loading .spinner {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

/* Empty State */
.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #6c757d;
    text-align: center;
}

.chart-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .org-chart-toolbar {
        padding: 0.5rem;
    }
    
    .org-chart-filters {
        padding: 0.5rem;
    }
    
    .persona-card {
        min-width: 120px;
        max-width: 140px;
        padding: 8px;
    }
    
    .persona-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .persona-name {
        font-size: 12px;
    }
    
    .persona-title {
        font-size: 10px;
    }
    
    .zoom-controls {
        bottom: 10px;
        right: 10px;
    }
    
    .minimap {
        display: none;
    }
}

/* Print Styles */
@media print {
    .org-chart-toolbar,
    .org-chart-filters,
    .zoom-controls,
    .minimap {
        display: none !important;
    }
    
    .org-chart-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .persona-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Animation Classes */
.node-enter {
    animation: nodeEnter 0.5s ease-out;
}

@keyframes nodeEnter {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.node-exit {
    animation: nodeExit 0.3s ease-in;
}

@keyframes nodeExit {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.connector-draw {
    animation: connectorDraw 0.8s ease-out;
}

@keyframes connectorDraw {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}



