/**
 * Career Progression Visualization Styles
 */

.cpv-container {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px;
    margin: 20px auto;
    max-width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.cpv-chart {
    width: 100%;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.cpv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.cpv-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cpv-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.cpv-btn {
    padding: 8px 16px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cpv-btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cpv-view-selector {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}


/* Tree visualization styles */
.node {
    cursor: pointer;
}

.node circle {
    transition: all 0.3s ease;
}

.node:hover circle {
    stroke-width: 4px !important;
}

.link {
    fill: none;
    stroke-opacity: 0.8;
}

.cross-path-link {
    fill: none;
    stroke-opacity: 0.7;
}

.year-label {
    font-weight: bold;
    user-select: none;
}

/* Tooltip styles */
.cpv-tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 300px;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cpv-tooltip-content {
    font-size: 14px;
    line-height: 1.6;
}

.cpv-tooltip strong {
    color: #2d3748;
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.cpv-tooltip em {
    color: #718096;
    font-size: 12px;
}

/* Info panel styles */
.cpv-info-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 24px;
    width: 100%;
    max-width: 400px;
    animation: slideUpFadeIn 0.4s ease-out;
    transition: all 0.3s ease;
}


@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpv-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(66, 46, 163, 0.3);
}


.cpv-info-title {
    display: flex;
    align-items: center;
}

.cpv-info-accent {
    background: linear-gradient(45deg, #422EA3, #711E9B);
    width: 6px;
    height: 32px;
    border-radius: 3px;
    margin-right: 12px;
}


.cpv-company-name {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-bottom: 4px;
}


.cpv-job-title {
    font-size: 20px;
    font-weight: bold;
    color: #422EA3;
    line-height: 1.2;
}


.cpv-close-btn {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: #4a5568;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    border: none;
}


.cpv-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}


.cpv-info-dates {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: #777;
    font-weight: 500;
}


.cpv-info-description {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.8;
    font-style: italic;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}


/* Layout variations */
@media (min-width: 768px) {
    .cpv-container.with-info-panel {
        flex-direction: row;
        align-items: flex-start;
        max-width: 85%;
    }
    
    .cpv-container.with-info-panel .cpv-chart {
        width: calc(100% - 420px);
    }
    
    .cpv-info-panel {
        margin-left: 20px;
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    .cpv-container {
        padding: 15px;
    }
    
    .cpv-controls {
        justify-content: center;
    }
    
    .cpv-info-panel {
        margin-top: 20px;
        max-width: 100%;
    }
}


/* Theme: Light - Bright and clean */
.cpv-container.cpv-theme-light {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cpv-container.cpv-theme-light .cpv-btn {
    background: #1976d2;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}

.cpv-container.cpv-theme-light .cpv-btn:hover {
    background: #1565c0;
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

.cpv-container.cpv-theme-light .cpv-spinner {
    border-top-color: #1976d2;
}

.cpv-container.cpv-theme-light text,
.cpv-container.cpv-theme-light .node-label {
    fill: #424242;
}

/* Theme: Dark - Dark mode styling */
.cpv-container.cpv-theme-dark {
    background: #1a1a1a;
    border: 1px solid #333333;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #e0e0e0;
}

.cpv-container.cpv-theme-dark .cpv-chart {
    background: rgba(26, 26, 26, 0.95);
}

.cpv-container.cpv-theme-dark .cpv-btn {
    background: #bb86fc;
    color: #1a1a1a;
}

.cpv-container.cpv-theme-dark .cpv-btn:hover {
    background: #9965f4;
}

.cpv-container.cpv-theme-dark .cpv-spinner {
    border-color: #333333;
    border-top-color: #bb86fc;
}

.cpv-container.cpv-theme-dark text,
.cpv-container.cpv-theme-dark .node-label {
    fill: #e0e0e0;
}

.cpv-container.cpv-theme-dark line {
    stroke: #444444 !important;
}

.cpv-container.cpv-theme-dark .cpv-loading p {
    color: #e0e0e0;
}

.cpv-container.cpv-theme-dark .cpv-info-panel {
    background: rgba(30, 30, 30, 0.95);
    color: #e0e0e0;
}

.cpv-container.cpv-theme-dark .cpv-close-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

/* Theme: System - Automatically uses light or dark based on user preference */
.cpv-container.cpv-theme-system {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cpv-container.cpv-theme-system .cpv-btn {
    background: #1976d2;
}

.cpv-container.cpv-theme-system .cpv-btn:hover {
    background: #1565c0;
}

.cpv-container.cpv-theme-system text,
.cpv-container.cpv-theme-system .node-label {
    fill: #424242;
}

@media (prefers-color-scheme: dark) {
    .cpv-container.cpv-theme-system {
        background: #1a1a1a;
        border: 1px solid #333333;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        color: #e0e0e0;
    }
    
    .cpv-container.cpv-theme-system .cpv-chart {
        background: rgba(26, 26, 26, 0.95);
    }
    
    .cpv-container.cpv-theme-system .cpv-btn {
        background: #bb86fc;
        color: #1a1a1a;
    }
    
    .cpv-container.cpv-theme-system .cpv-btn:hover {
        background: #9965f4;
    }
    
    .cpv-container.cpv-theme-system .cpv-spinner {
        border-color: #333333;
        border-top-color: #bb86fc;
    }
    
    .cpv-container.cpv-theme-system text,
    .cpv-container.cpv-theme-system .node-label {
        fill: #e0e0e0;
    }
    
    .cpv-container.cpv-theme-system line {
        stroke: #444444 !important;
    }
    
    .cpv-container.cpv-theme-system .cpv-loading p {
        color: #e0e0e0;
    }
}

/* Path-specific colors */
.path-it { color: #4299e1; }
.path-design { color: #ed8936; }
.path-engineering { color: #48bb78; }

/* Node highlights */
.node-highlight {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}