/* MPLS-IP.guru Custom Styles */

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 56px; /* Height of navbar */
    bottom: 0;
    left: 0;
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #495057;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.25rem;
    margin: 0.125rem 0;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
    text-decoration: none;
}

.sidebar .nav-link.active {
    color: #007bff;
    background-color: #e3f2fd;
}

/* Accordion styles for sidebar navigation */
.accordion-button {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.accordion-button:not(.collapsed) {
    color: #6f42c1;
    background-color: #f8f9fa;
}

.accordion-button:focus {
    z-index: 3;
    border-color: #6f42c1;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25);
}

/* Main content area */
main {
    padding-top: 1rem;
    min-height: calc(100vh - 56px);
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Welcome section styling */
.welcome-section {
    padding: 1rem 0;
}

.welcome-section h1 {
    color: #6f42c1;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Button styling */
.btn-primary {
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-primary:hover {
    background-color: #5a359a;
    border-color: #5a359a;
}

.btn-primary:focus, .btn-primary.focus {
    color: #fff;
    background-color: #5a359a;
    border-color: #5a359a;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.5);
}

/* Alert box styling */
.alert-info {
    border-left: 4px solid #6f42c1;
}

.alert-success {
    border-left: 4px solid #28a745;
}

/* Progress bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1031;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6f42c1 0%, #9b59b6 100%);
    width: 0%;
    transition: width 0.1s ease;
}

/* Table styles */
.table {
    margin-bottom: 1.5rem;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #6f42c1;
    font-weight: 600;
    color: #495057;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(111, 66, 193, 0.05);
}

/* Code blocks */
pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

code {
    color: #6f42c1;
    font-size: 0.875em;
}

pre code {
    color: inherit;
}

/* List styling */
ul li {
    margin-bottom: 0.25rem;
}

/* Section headers */
h2 {
    color: #6f42c1;
    border-bottom: 2px solid #6f42c1;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h3 {
    color: #495057;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    main {
        padding-top: 0;
    }
}

/* Link colors */
a {
    color: #6f42c1;
    text-decoration: none;
}

a:hover {
    color: #5a359a;
    text-decoration: underline;
}

/* Stats cards (if needed) */
.stats-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Tool cards */
.tool-card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: #6f42c1;
    box-shadow: 0 4px 8px rgba(111, 66, 193, 0.1);
}

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

/* Footer (if added later) */
.footer {
    background-color: #6f42c1;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: #e9ecef;
}

.footer a:hover {
    color: white;
}

/* Print styles */
@media print {
    .sidebar, .navbar, .progress-container {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.btn:focus,
.accordion-button:focus {
    outline: 2px solid #6f42c1;
    outline-offset: 2px;
}

/* Loading animation (for future use) */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6f42c1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

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

/* Highlight boxes */
.highlight-box {
    background-color: #f8f9fa;
    border-left: 4px solid #6f42c1;
    padding: 1rem;
    margin: 1rem 0;
}

.highlight-box h5 {
    color: #6f42c1;
    margin-bottom: 0.5rem;
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
    content: var(--bs-breadcrumb-divider, ">") /* rtl: var(--bs-breadcrumb-divider, "<") */;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Image responsive */
img {
    max-width: 100%;
    height: auto;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #5a359a;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .table {
        color: #e2e8f0;
    }
    
    .table th {
        background-color: #4a5568;
        color: #e2e8f0;
    }
}