/* BGProuting.guru Custom Styles */
:root {
    --primary-color: #0dcaf0;
    --secondary-color: #17a2b8;
    --accent-color: #20c997;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --hover-color: #0bb3d6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar {
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 56px);
    padding-top: 0;
}

.sidebar .nav-link {
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.sidebar .nav-link.active {
    background-color: var(--secondary-color);
    color: white;
    border-left: 4px solid var(--accent-color);
}

.accordion-button {
    background-color: #f8f9fa;
    color: var(--text-dark);
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.content-section {
    padding: 2rem 0;
}

.content-section h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.content-section h2 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-section h3 {
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.alert {
    border-left: 4px solid;
    border-radius: 0.375rem;
}

.alert-info {
    border-left-color: var(--primary-color);
}

.alert-success {
    border-left-color: var(--accent-color);
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-danger {
    border-left-color: #dc3545;
}

.config-block {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.375rem;
}

.config-block h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cisco-config {
    border-left-color: #1ba1e2;
}

.cisco-config pre code {
    color: #333;
}

.juniper-config {
    border-left-color: #84bd00;
}

.config-block pre {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.25rem;
    overflow-x: auto;
}

.config-block pre code {
    background-color: transparent;
    color: inherit;
}

.nav-buttons {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.nav-buttons .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.table {
    background-color: white;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(13, 202, 240, 0.05);
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid var(--border-color);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
    width: 0%;
}

/* BGP-specific styling */
.bgp-session-state {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.bgp-session-state.established {
    background-color: var(--accent-color);
    color: white;
}

.bgp-session-state.active {
    background-color: #ffc107;
    color: #000;
}

.bgp-session-state.idle {
    background-color: #6c757d;
    color: white;
}

.bgp-session-state.connect {
    background-color: var(--primary-color);
    color: white;
}

.as-path {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
}

.bgp-attribute {
    background-color: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin: 0.125rem;
    display: inline-block;
}

.bgp-attribute.well-known {
    background-color: var(--primary-color);
    color: white;
}

.bgp-attribute.optional {
    background-color: var(--secondary-color);
    color: white;
}

.route-map {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
}

.route-map h4 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.state-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.state {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin: 0.5rem;
    font-weight: 500;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.state.active {
    background-color: var(--accent-color);
    transform: scale(1.05);
}

.state-arrow {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 0 0.5rem;
}

/* Interactive Tools */
.interactive-tool {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.tool-input {
    margin-bottom: 1rem;
}

.tool-input label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

.tool-output {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

.tool-output h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.as-topology {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
    min-height: 300px;
}

.as-node {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem;
    display: inline-block;
    font-weight: 500;
}

.as-node.external {
    background-color: var(--secondary-color);
}

.as-node.internal {
    background-color: var(--accent-color);
}

.path-analysis {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
}

.path-analysis h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.bgp-table {
    font-size: 0.875rem;
}

.bgp-table th,
.bgp-table td {
    padding: 0.5rem;
    vertical-align: top;
}

.prefix-list {
    background-color: #f0f8ff;
    border: 1px solid #cce7ff;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
}

.prefix-list h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.community-list {
    background-color: #f0fff0;
    border: 1px solid #ccffcc;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
}

.community-list h4 {
    color: #009900;
    margin-bottom: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 56px);
        background-color: white;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .content-section {
        padding: 1rem 0;
    }
    
    .state-diagram {
        flex-direction: column;
    }
    
    .state-arrow {
        transform: rotate(90deg);
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .interactive-tool {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0;
    }
    
    .content-section {
        padding: 0.5rem;
    }
    
    .content-section h1 {
        font-size: 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.25rem;
    }
    
    .nav-buttons {
        text-align: center;
    }
    
    .nav-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .state {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}