/* Common styles for Angular Awesome documentation */

/* Layout */
body {
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

.content-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h3 {
    margin: 0;
    color: #0066cc;
}

.sidebar-content {
    flex: 1;
    padding: 20px 0;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    text-align: center;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #e9ecef;
    color: #0066cc;
}

.sidebar-section {
    display: block;
    padding: 8px 20px;
    font-weight: bold;
    color: #212529;
    margin-top: 10px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.sidebar-nav ul li a {
    padding-left: 35px;
    font-size: 0.95rem;
}

/* Header */
header {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* Navigation tabs */
.nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #eee;
}

.nav-tabs li {
    margin-right: 10px;
}

.nav-tabs a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #666;
    border-bottom: 2px solid transparent;
}

.nav-tabs a:hover,
.nav-tabs a.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Typography */
h2 {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

h3 {
    margin-top: 1.5rem;
    color: #0066cc;
}

code {
    background-color: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

/* Examples */
.example {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.example h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
}

/* Footer */
footer {
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
    color: #666;
}

/* Component grid */
.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.component-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

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

.component-card h3 {
    margin-top: 0;
    color: #0066cc;
}

.component-card p {
    color: #666;
    margin-bottom: 10px;
}

/* Search */
.search-container {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .sidebar-content {
        display: none;
    }

    .sidebar-content.active {
        display: block;
    }

    .sidebar-toggle {
        display: block;
        padding: 10px;
        background: none;
        border: none;
        font-size: 1rem;
        cursor: pointer;
        width: 100%;
        text-align: left;
    }

    .component-grid {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }
}

/* Toggle button for mobile */
.sidebar-toggle {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
}
