/**
 * Multi-Cloud Pass - Graph Visualization Styles
 */

/* ==================== Graph Container ==================== */
.vis-network {
    outline: none;
}

#portfolio-graph,
#architecture-graph,
#aws-services-graph,
#mini-portfolio-graph {
    background-color: #fafbfc;
    border-radius: 0.375rem;
}

/* ==================== vis.js Overrides ==================== */
.vis-tooltip {
    position: absolute;
    visibility: hidden;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 350px;
    z-index: 1000;
}

.vis-tooltip h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.vis-tooltip hr {
    margin: 8px 0;
    border-color: #eee;
}

/* Navigation Buttons */
.vis-button {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.vis-button:hover {
    background-color: #f5f5f5 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

.vis-navigation {
    margin: 10px;
}

/* ==================== Node Styles ==================== */
/* These are applied via vis.js options, but we define hover states here */

.node-project {
    cursor: pointer;
}

.node-resource {
    cursor: pointer;
}

.node-technology {
    cursor: default;
}

/* ==================== Legend ==================== */
.graph-legend {
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 8px;
}

.legend-line {
    width: 30px;
    height: 2px;
    margin-right: 8px;
}

.legend-line-dashed {
    border-top: 2px dashed #666;
}

.legend-line-solid {
    border-top: 2px solid #999;
}

/* ==================== Loading Overlay ==================== */
.graph-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* ==================== Service Category Colors ==================== */
.category-compute { background-color: #FF9900; }
.category-storage { background-color: #3F8624; }
.category-database { background-color: #2E73B8; }
.category-networking { background-color: #8C4FFF; }
.category-security { background-color: #DD344C; }
.category-management { background-color: #E7157B; }
.category-analytics { background-color: #00A4A6; }
.category-migration { background-color: #C7511F; }

/* ==================== Project Type Colors ==================== */
.type-migration { background-color: #3498db; }
.type-webapp { background-color: #2ecc71; }
.type-automation { background-color: #e67e22; }
.type-pipeline { background-color: #9b59b6; }
.type-serverless { background-color: #1abc9c; }

/* ==================== Edge Styles ==================== */
.edge-dependency {
    stroke-dasharray: 5, 5;
}

.edge-flow {
    stroke: #999;
}

/* ==================== Selection Highlight ==================== */
.node-selected {
    stroke: #FF9900 !important;
    stroke-width: 3px !important;
}

/* ==================== Graph Controls ==================== */
.graph-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.graph-controls .btn {
    opacity: 0.8;
}

.graph-controls .btn:hover {
    opacity: 1;
}

/* ==================== Zoom Controls ==================== */
.zoom-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zoom-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== Mini Graph ==================== */
#mini-portfolio-graph {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

#mini-portfolio-graph .vis-navigation {
    display: none;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    #portfolio-graph,
    #architecture-graph,
    #aws-services-graph {
        height: 400px !important;
    }

    .vis-navigation {
        display: none;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    #portfolio-graph,
    #architecture-graph,
    #aws-services-graph {
        page-break-inside: avoid;
        background: #fff !important;
    }

    .vis-navigation {
        display: none !important;
    }
}

/* ==================== Export Preview ==================== */
.export-preview {
    border: 1px solid #ddd;
    padding: 20px;
    background: #fff;
    margin-bottom: 20px;
}

.export-preview canvas {
    max-width: 100%;
    height: auto;
}
