/* Custom styles for AI Supply Chain Mapping Web App */

/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Font switching - change 'quicksand' to 'nunito' to switch fonts */
    --primary-font: 'Nunito Sans';
    --fallback-fonts: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --typewriter-font: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    --custom-primary: #264653;
    --stats-color: #48A69B;
    --network-color: #09B5D8;
    --search-actor-color: #BB2A4F;
    --search-pair-color: #F4D461;
    --timeseries-color: #E76F51;
    --project-color: #6D589D;
}

body {
    font-family: var(--primary-font), var(--fallback-fonts);
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Feature Icons */
.feature-icon {
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
}

/* Jumbotron */
.jumbotron {
    background: linear-gradient(135deg, var(--custom-primary) 0%, #1e3a42 100%);
    border-radius: 0.5rem;
}

/* Search Forms */
.form-control:focus {
    border-color: #264653;
    box-shadow: 0 0 0 0.2rem rgba(38, 70, 83, 0.25);
}

/* Relationship Cards */
.border-left-primary {
    border-left: 4px solid #264653 !important;
}

.border-left-warning {
    border-left: 4px solid #ffc107 !important;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Network Graph */
#networkContainer {
    background-color: #ffffff;
    border-radius: 0.375rem;
}

.filter-section {
    background-color: #e5e7eb;
}

/* Statistics Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem !important;
    }
    
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .btn-group-vertical {
        width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Network Graph Specific Styles */
.vis-network {
    outline: none;
}

.vis-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    max-width: 200px;
    word-wrap: break-word;
}

/* Search Results */
.search-result-card {
    transition: all 0.3s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Statistics Charts */
.plotly-graph-div {
    border-radius: 0.375rem;
}

/* Custom Button Styles */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* List Groups */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    transition: background-color 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Text Utilities */
.text-muted {
    color: #6c757d !important;
}

/* Typewriter Effect */
.typewriter-text {
    font-family: var(--typewriter-font);
    font-size: 0.95rem;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

/* Custom Color Override */
.bg-primary {
    background-color: var(--custom-primary) !important;
}

.btn-primary {
    background-color: var(--custom-primary);
    border-color: var(--custom-primary);
}

.btn-primary:hover {
    background-color: #1e3a42;
    border-color: #1e3a42;
}

.text-primary {
    color: var(--custom-primary) !important;
}

.border-primary {
    border-color: var(--custom-primary) !important;
}

/* Statistics Card Custom Styling */
.bg-stats {
    background-color: var(--stats-color) !important;
}

.btn-stats {
    background-color: var(--stats-color);
    border-color: var(--stats-color);
    color: white;
}

.btn-stats:hover {
    background-color: #3d8b7f;
    border-color: #3d8b7f;
    color: white;
}

/* Search Actor Card Custom Styling */
.bg-search-actor {
    background-color: var(--search-actor-color) !important;
}

.btn-search-actor {
    background-color: var(--search-actor-color);
    border-color: var(--search-actor-color);
    color: white;
}

.btn-search-actor:hover {
    background-color: #a02442;
    border-color: #a02442;
    color: white;
}

/* Search Pair Card Custom Styling */
.bg-search-pair {
    background-color: var(--search-pair-color) !important;
}

.btn-search-pair {
    background-color: var(--search-pair-color);
    border-color: var(--search-pair-color);
    color: #333;
}

.btn-search-pair:hover {
    background-color: #e6c24a;
    border-color: #e6c24a;
    color: #333;
}

/* Time Series Card Custom Styling */
.bg-timeseries {
    background-color: var(--timeseries-color) !important;
}

.btn-timeseries {
    background-color: var(--timeseries-color);
    border-color: var(--timeseries-color);
    color: white;
}

.btn-timeseries:hover {
    background-color: #d45a3a;
    border-color: #d45a3a;
    color: white;
}

/* Animation Controls Styling */
.animation-controls {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.animation-description {
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 0 !important;
}

.time-slider {
    height: 0.5rem;
    cursor: pointer;
    background: #dee2e6;
    border-radius: 0.25rem;
}

.time-slider::-webkit-slider-thumb {
    width: 1.125rem;
    height: 1.125rem;
    background-color: var(--timeseries-color);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(231, 111, 81, 0.4);
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: grab;
}

.time-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(231, 111, 81, 0.5);
    cursor: grabbing;
}

.time-slider::-moz-range-thumb {
    width: 1.125rem;
    height: 1.125rem;
    background-color: var(--timeseries-color);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(231, 111, 81, 0.4);
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: grab;
}

.time-slider::-moz-range-thumb:active {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(231, 111, 81, 0.5);
    cursor: grabbing;
}

/* Zoom Controls Styling */
.zoom-controls {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.375rem;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoom-btn {
    background-color: rgba(108, 117, 125, 0.7);
    border-color: rgba(108, 117, 125, 0.7);
    color: white;
    border-radius: 0.25rem;
    margin-bottom: 2px;
}

.zoom-btn:hover {
    background-color: rgba(108, 117, 125, 0.9);
    border-color: rgba(108, 117, 125, 0.9);
    color: white;
}

.zoom-btn:active,
.zoom-btn:focus {
    background-color: rgba(108, 117, 125, 0.9);
    border-color: rgba(108, 117, 125, 0.9);
    color: white;
    box-shadow: none;
}

.zoom-controls .btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Network Graph Card Custom Styling */
.bg-network {
    background-color: var(--network-color) !important;
}

.btn-network {
    background-color: var(--network-color);
    border-color: var(--network-color);
    color: white;
}

.btn-network:hover {
    background-color: #0789a3;
    border-color: #0789a3;
    color: white;
}

/* Project Description Card Custom Styling */
.bg-project {
    background-color: var(--project-color) !important;
}

.btn-project {
    background-color: var(--project-color);
    border-color: var(--project-color);
    color: white;
}

.btn-project:hover {
    background-color: #5a4a7d;
    border-color: #5a4a7d;
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Custom Badge Colors for Search Results */
.badge.bg-primary {
    background-color: #48A69B !important;
    color: white !important;
}

.badge.bg-success {
    background-color: #F4D461 !important;
    color: black !important;
}

/* Custom Button Colors */
.btn-outline-primary {
    color: #264653 !important;
    border-color: #264653 !important;
}

.btn-outline-primary:hover {
    background-color: #264653 !important;
    border-color: #264653 !important;
    color: white !important;
}

/* Pagination Colors */
.pagination .page-link {
    color: #264653 !important;
}

.pagination .page-item.active .page-link {
    background-color: #264653 !important;
    border-color: #264653 !important;
    color: white !important;
}

.pagination .page-link:hover {
    color: #264653 !important;
    background-color: #f8f9fa !important;
    border-color: #264653 !important;
}

/* Form Check Input Colors */
.form-check-input:checked {
    background-color: #264653 !important;
    border-color: #264653 !important;
}

.form-check-input:focus {
    border-color: #264653 !important;
    box-shadow: 0 0 0 0.25rem rgba(38, 70, 83, 0.25) !important;
}
