/* ============================================================
   AIDD Module Navigation — layout styles
   Column 3 (Tool Navigation) sits between Category sidebar and Workspace.
   ============================================================ */

.aidd-layout {
    display: flex;
    min-height: 100vh;
    min-width: 0;
}

.aidd-module-nav {
    flex: 0 0 160px;
    min-width: 160px;
    background: #e8edf3;
    border-right: 1px solid #d4dce6;
    display: flex;
    flex-direction: column;
    padding: 14px 10px;
    gap: 2px;
    overflow-y: auto;
}

.aidd-module-nav .nav-header {
    padding: 8px 10px 6px;
    color: #1e293b;
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid #d4dce6;
    margin-bottom: 4px;
}

.aidd-module-nav .nav-item {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s ease, color .15s ease;
    cursor: pointer;
}

.aidd-module-nav .nav-item:hover {
    background: #dce3ec;
    color: #0f3a66;
}

.aidd-module-nav .nav-item.active {
    background: #ffffff;
    color: #0f3a66;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    font-weight: 700;
}

.aidd-workspace {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
}

/* At narrow widths: transform sidebar nav into horizontal top bar */
@media (max-width: 900px) {
    .aidd-layout {
        flex-direction: column;
        min-width: 0;
        width: 100%;
    }

    .aidd-module-nav {
        display: flex;
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 8px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-right: none;
        border-bottom: 1px solid #d4dce6;
        background: #eef2f7;
    }

    .aidd-module-nav::-webkit-scrollbar {
        display: none;
    }

    .aidd-module-nav .nav-header {
        display: none;
    }

    .aidd-module-nav .nav-item {
        flex: 0 0 auto;
        min-height: 36px;
        padding: 8px 14px;
        white-space: nowrap;
        font-size: 13px;
        border-radius: 8px;
    }

    .aidd-workspace {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}
