/* 
 * Sidebar Styles for Supply Chain Intel
 * Can be included in main.css or as separate file
 */

.sidebar-wrapper {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar {
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
}

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

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem !important;
}

.sidebar-section {
    border-bottom: 1px solid #f8f9fa;
    padding-bottom: 1rem;
}

.sidebar-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Legal Navigation Styles */
.legal-nav .nav-link {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.legal-nav .nav-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateX(5px);
}

.legal-nav .nav-link.active {
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Table of Contents Styles */
.toc-container {
    max-height: 300px;
    overflow-y: auto;
}

.toc-item {
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.25rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.toc-item:hover {
    border-left-color: #007bff;
    background-color: #f8f9fa;
}

.toc-item.active {
    border-left-color: #007bff;
    background-color: #e3f2fd;
    font-weight: 600;
}

.toc-item a {
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
}

.toc-item.toc-h2 {
    padding-left: 0.75rem;
}

.toc-item.toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.8rem;
}

.toc-item.toc-h4 {
    padding-left: 2.25rem;
    font-size: 0.75rem;
}

/* Contact Information */
.contact-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    border-left: 4px solid #007bff;
}

/* Compliance Badges */
.compliance-badges .badge {
    font-size: 0.75rem;
    padding: 0.5rem;
    font-weight: 500;
}

/* Newsletter Form */
.newsletter-signup {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.newsletter-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Help Links */
.help-links .btn {
    font-size: 0.875rem;
}

/* Social Links */
.social-links .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar-wrapper {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 2rem;
    }
    
    .sidebar {
        margin-bottom: 1rem;
    }
    
    .sidebar-title {
        font-size: 0.9rem;
    }
    
    .toc-container {
        max-height: 200px;
    }
}

/* Print Styles */
@media print {
    .sidebar-wrapper {
        display: none;
    }
}