/* Telecom Customer 360° Dashboard - Custom Styles */

/* Sankey Chart Specific Styles */
#sales-pipeline-graph {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    min-height: 700px;
    position: relative;
}

#sales-pipeline-graph svg {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

#sales-pipeline-graph .nodes rect {
    cursor: pointer;
    transition: all 0.2s ease;
}

#sales-pipeline-graph .nodes rect:hover {
    stroke-width: 3px !important;
    stroke: #333 !important;
}

#sales-pipeline-graph .links path {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#sales-pipeline-graph .links path:hover {
    opacity: 0.8 !important;
    stroke-width: 6 !important;
}

#sales-pipeline-graph .labels text {
    pointer-events: none;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Color Palette Variables - Now using theme.css variables */
/* These variables are now defined in theme.css for consistency across all pages */

/* Global Styles - Now using theme.css base styles */
/* Base styles are now defined in theme.css for consistency */

/* Header Styles - Now using theme.css header styles */
/* Header card styles are now defined in theme.css for consistency */

/* Dashboard Card Styles - Now using theme.css card styles */
/* Dashboard card styles are now defined in theme.css for consistency */

/* Widget Content Styles */
.widget-content {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Graph Widget Styles */
.graph-widget {
    min-height: 800px; /* Significantly increased height for maximum treemap */
}

.graph-content {
    min-height: 750px; /* Significantly increased height for maximum treemap */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    /* font-style: italic; */
}

/* Placeholder Styles for Widgets */
.widget-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.widget-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-gray-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .customer-name {
        font-size: 1.5rem;
    }
    
    .customer-details {
        font-size: 1rem;
    }
    
    .status-indicator {
        text-align: left;
        margin-top: 1rem;
    }
    
    .dashboard-card .card-body {
        padding: 1rem;
    }
    
    .widget-content {
        min-height: 150px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .header-card {
        margin-bottom: 1rem;
    }
    
    .customer-name {
        font-size: 1.3rem;
    }
    
    .dashboard-card .card-header {
        padding: 0.75rem 1rem;
    }
    
    .dashboard-card .card-title {
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--secondary-gray-medium);
    border-radius: 50%;
    border-top-color: var(--primary-blue-dark);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-muted {
    color: var(--text-secondary) !important;
}

.bg-light {
    background-color: var(--secondary-gray-light) !important;
}

.border {
    border-color: var(--border-color) !important;
}

/* Custom Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.badge-success {
    background-color: var(--accent-green-medium);
    color: var(--text-primary);
}

.badge-warning {
    background-color: var(--warning-orange-medium);
    color: var(--text-primary);
}

.badge-info {
    background-color: var(--primary-blue-medium);
    color: var(--text-primary);
}

.badge-secondary {
    background-color: var(--secondary-gray-dark);
    color: white;
}

/* Chart Container Styles */
.chart-container {
    width: 100%;
    height: 400px;
    margin: 1rem 0;
}

.chart-container svg {
    width: 100%;
    height: 100%;
}

/* Tooltip Styles */
.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Chart Filters Styles */
.chart-filters {
    background-color: var(--secondary-gray-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.chart-filters .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.chart-filters .form-select {
    border-color: var(--border-color);
    background-color: white;
}

.chart-filters .form-select:focus {
    border-color: var(--primary-blue-dark);
    box-shadow: 0 0 0 0.2rem rgba(144, 202, 249, 0.25);
}

.chart-filters .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}


/* Metric Display Styles */
.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.metric-change.positive {
    color: var(--accent-green-medium);
}

.metric-change.negative {
    color: var(--warning-orange-medium);
}

/* Progress Bar Styles */
.progress {
    height: 8px;
    background-color: var(--secondary-gray-medium);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary-blue-dark);
    transition: width 0.6s ease;
}

/* List Styles */
.list-group-item {
    border-color: var(--border-color);
    background-color: white;
}

.list-group-item:hover {
    background-color: var(--secondary-gray-light);
}

/* Button Styles */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
}

.btn-primary:hover {
    background-color: var(--primary-blue-medium);
    border-color: var(--primary-blue-medium);
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--secondary-gray-dark);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-gray-dark);
    border-color: var(--secondary-gray-dark);
    color: white;
}

/* Event Marker Styles */
.event-marker {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* .event-marker:hover {
    transform: scale(1.3);
}

/* Prevent tooltip from interfering with marker hover */
.event-marker:hover circle {
    r: 7;
    stroke-width: 1.5;
    z-index: 1;
}

.event-marker circle {
    transition: all 0.3s ease;
}

.event-marker:hover circle {
    r: 7;
    stroke-width: 1.5;
} */

/* Font Awesome Icons in SVG - Unicode approach */
.event-marker text {
    font-size: 6px;
    text-anchor: middle;
    dominant-baseline: central;
}
/* text{
    font-family:  'Font Awesome 6 free';
} */

/* Tabbed Interface Styling */
.nav-sm .nav-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    transition: all 0.2s ease;
}

.nav-sm .nav-link:hover {
    color: #007bff;
    border-bottom-color: #e3f2fd;
}

.nav-sm .nav-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: transparent;
}

.nav-sm .nav-link i {
    font-size: 0.7rem;
    width: 12px;
}

.tab-content {
    min-height: 300px;
}

.tab-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 0.75rem;
}

/* Animation Controls Styling */
.animation-controls-container .control-button:hover {
    opacity: 0.8 !important;
}

.animation-controls-container .control-button:active {
    transform: scale(0.95);
}

.animation-controls-container .week-selector:hover {
    opacity: 0.8;
}

.animation-controls-container .speed-button:hover {
    rect {
        fill: #42a5f5 !important;
    }
}

/* Responsive animation controls */
@media (max-width: 768px) {
    .animation-controls-container {
        transform: translate(20px, var(--height)) !important;
    }
    
    .control-button text {
        font-size: 7px !important;
    }
    
    .treemap-summary-stats {
        font-size: 8px !important;
    }
}

/* Animation container enhancements */
.treemap-container-base {
    transition: all 0.3s ease;
    min-height: 420px !important; /* Ensure space for controls */
    overflow: visible !important; /* Prevent clipping */
}

/* Manager Overview Widget - ensure adequate height */
.dashboard-card.graph-widget {
    min-height: 480px; /* Minimum height for animation + controls */
}

.graph-content {
    min-height: 400px; /* Minimum height for content area */
    overflow: visible !important; /* Ensure controls are visible */
}

.treemap-leaf {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.treemap-leaf:hover {
    opacity: 0.9;
}

/* Ensure animation controls are always visible */
.animation-controls-container {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Treemap Slider Styles */
.treemap-slider-container {
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.treemap-week-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.treemap-week-slider:hover {
    height: 12px;
}

.treemap-week-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.treemap-week-slider::-webkit-slider-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.treemap-week-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.treemap-week-slider::-moz-range-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.treemap-week-slider:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Treemap Legend Styles */
.treemap-legend-container {
    width: 100%;
    padding: 8px 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.treemap-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 10px;
    transition: all 0.2s ease;
    cursor: default;
}

.treemap-legend-item:hover {
    background-color: #e3f2fd;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.legend-color-square {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Responsive slider controls */
@media (max-width: 768px) {
    .treemap-slider-container {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .treemap-week-slider {
        height: 6px;
    }
    
    .treemap-week-slider::-webkit-slider-thumb {
        width: 16px;
        height: 16px;
    }
    
    .treemap-week-slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
    }
    
    .treemap-legend-container {
        padding: 6px 12px;
        gap: 8px;
        margin-top: 1px;
    }
    
    .treemap-legend-item {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .legend-color-square {
        width: 8px;
        height: 8px;
    }
}
